:root {
  --bg: #07070b;
  --bg-2: #0d0e15;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.06);
  --line: rgba(236, 230, 214, 0.09);
  --bone: #ece6d6;
  --bone-dim: #a59f93;
  --faint: #5f5c69;
  --ecto: #a6ff5c;
  --ecto-glow: rgba(166, 255, 92, 0.45);
  --candle: #ffb547;
  --blood: #ff5c4d;
  --stone-1: #4a4d58;
  --stone-2: #33363f;
  --stone-3: #24262d;
  --radius: 16px;
  --display: "Anton", "Impact", sans-serif;
  --carve: "Cinzel", Georgia, serif;
  --fell: "IM Fell English", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(900px 500px at 15% -5%, rgba(166, 255, 92, 0.07), transparent 60%),
    radial-gradient(900px 600px at 90% 10%, rgba(120, 140, 255, 0.07), transparent 60%),
    var(--bg);
  color: var(--bone);
  font-family: var(--fell);
  font-size: 17px;
  line-height: 1.45;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; }

/* film grain over everything */
.grain {
  position: fixed; inset: -50%; z-index: 50; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } }

/* ---- the ticker bar ---------------------------------------------------- */
.marquee {
  position: relative; z-index: 3; display: flex; align-items: center; height: 38px;
  background: var(--ecto); color: #0b0f06; font: 600 13px var(--mono); letter-spacing: 0.02em;
  box-shadow: 0 0 30px var(--ecto-glow);
}
.marquee-tag { flex: none; padding: 0 14px; height: 100%; display: flex; align-items: center; background: #0b0f06; color: var(--ecto); font-weight: 800; }
.marquee-window { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.marquee-track { display: inline-flex; gap: 34px; white-space: nowrap; padding-left: 20px; animation: scroll 60s linear infinite; }
.marquee-track .mq b { font-weight: 800; }
.marquee-track .mq i { font-style: normal; opacity: 0.75; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---- nav --------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 22px;
  padding: 14px max(20px, calc((100vw - 1240px) / 2));
  background: rgba(7, 7, 11, 0.72); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 22px var(--display); letter-spacing: 0.04em; }
.logo svg { width: 24px; height: 30px; filter: drop-shadow(0 0 8px var(--ecto-glow)); }
.links { display: flex; gap: 20px; font: 13px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }
.links a { text-decoration: none; color: var(--bone-dim); }
.links a:hover { color: var(--ecto); }
.search { position: relative; margin-left: auto; width: min(340px, 40vw); }
.search input {
  width: 100%; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--bone); font: 14px var(--mono); outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.search input:focus { border-color: var(--ecto); box-shadow: 0 0 0 4px rgba(166, 255, 92, 0.12); }
.results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #12131b; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; z-index: 30; box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6);
}
.results a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; text-decoration: none; border-bottom: 1px solid var(--line); font-size: 15px; }
.results a:hover { background: var(--panel-2); }
.results .muted { color: var(--bone-dim); font: 12px var(--mono); padding: 12px 14px; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; font: 800 11px var(--mono); letter-spacing: 0.12em; color: var(--faint); border: 1px solid var(--line); padding: 6px 10px; border-radius: 999px; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.live-pill.on { color: var(--ecto); border-color: rgba(166, 255, 92, 0.35); }
.live-pill.on i { background: var(--ecto); box-shadow: 0 0 10px var(--ecto); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

main, .foot { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ---- hero -------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 40px; align-items: end; padding: 64px 0 40px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; font: 600 12px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--bone-dim); }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--ecto); box-shadow: 0 0 12px var(--ecto); animation: pulse 1.6s infinite; }
h1 { margin: 0; font: clamp(58px, 8.2vw, 122px) / 0.9 var(--display); text-transform: uppercase; letter-spacing: 0.005em; }
.h-line { display: block; }
.glow { color: var(--ecto); text-shadow: 0 0 28px var(--ecto-glow), 0 0 80px rgba(166, 255, 92, 0.25); }
.lede { max-width: 560px; margin: 24px 0 28px; font-size: clamp(18px, 1.6vw, 21px); color: var(--bone-dim); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--bone); font: 600 14px var(--mono); text-decoration: none; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(236, 230, 214, 0.3); }
.btn.primary { background: var(--ecto); color: #0b0f06; border-color: var(--ecto); box-shadow: 0 10px 30px rgba(166, 255, 92, 0.25); }
.btn.primary:hover { box-shadow: 0 0 0 6px rgba(166, 255, 92, 0.15), 0 14px 40px rgba(166, 255, 92, 0.35); }
.btn.flowers { color: var(--candle); }
.btn[disabled] { opacity: 0.7; cursor: default; }

.hero-side { display: grid; gap: 14px; }
.death-clock {
  position: relative; overflow: hidden; padding: 22px 24px; border-radius: 22px; border: 1px solid rgba(166, 255, 92, 0.25);
  background: linear-gradient(160deg, rgba(166, 255, 92, 0.1), rgba(166, 255, 92, 0.02) 50%, var(--panel));
}
.death-clock::after { content: "☠"; position: absolute; right: -10px; bottom: -34px; font-size: 150px; opacity: 0.05; }
.dc-label { display: block; font: 600 12px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ecto); }
.dc-n { display: block; font: clamp(64px, 7vw, 96px) / 1 var(--display); margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.dc-n.bump { animation: bump 0.4s ease-out; }
@keyframes bump { 40% { color: var(--ecto); transform: scale(1.04); } }
.dc-sub { color: var(--bone-dim); font-size: 15px; font-style: italic; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-stats > div { padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.mini-stats .n { display: block; font: 800 22px var(--mono); }
.mini-stats .l { font: 11px var(--mono); color: var(--bone-dim); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---- visit your own graveyard ------------------------------------------- */
.visit {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 30px; align-items: center;
  margin: 0 0 40px; padding: 30px 32px; border-radius: 24px; border: 1px solid rgba(166, 255, 92, 0.22);
  background: radial-gradient(500px 220px at 100% 0%, rgba(166, 255, 92, 0.09), transparent 70%), var(--bg-2);
}
.visit h2 { font-size: clamp(34px, 4vw, 52px); }
.visit-form { display: flex; gap: 10px; flex-wrap: wrap; }
.visit-form input {
  flex: 1 1 260px; min-width: 0; padding: 14px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--bone); font: 14px var(--mono); outline: none;
}
.visit-form input:focus { border-color: var(--ecto); box-shadow: 0 0 0 4px rgba(166, 255, 92, 0.12); }
.visit-err { flex-basis: 100%; margin: 0; min-height: 1.2em; color: var(--blood); font: 13px var(--mono); }
.wallet-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr); gap: 30px; align-items: end; margin-bottom: 30px; }
.wallet-sum .dc-n { font-size: clamp(70px, 9vw, 120px); }
.holding { display: block; margin-top: 6px; font: 12px var(--mono); color: var(--candle); }
.visited { columns: 3 220px; margin: 14px 0 0; padding: 0; list-style: none; }
.visited li { break-inside: avoid; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.visited a { color: var(--bone); text-decoration: none; font-family: var(--mono); }
.visited span { color: var(--bone-dim); font-size: 13px; }
.sub-h { margin: 46px 0 6px; font-size: clamp(28px, 3.2vw, 40px); }
@media (max-width: 980px) { .visit, .wallet-hero { grid-template-columns: 1fr; } }

/* ---- the live cemetery --------------------------------------------------- */
.scene-wrap { margin: 10px 0 70px; }
.scene {
  position: relative; height: clamp(360px, 42vw, 520px); border-radius: 28px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55), inset 0 0 120px rgba(0, 0, 0, 0.6);
  isolation: isolate;
}
.sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.stars circle { animation: twinkle 4s ease-in-out infinite; }
.stars circle:nth-child(3n) { animation-delay: 1.3s; }
.stars circle:nth-child(3n+1) { animation-delay: 2.6s; }
@keyframes twinkle { 50% { opacity: 0.25; } }
.field { position: absolute; left: 0; right: 0; bottom: 18%; height: 34%; width: 100%; }
.fog {
  position: absolute; left: -50%; width: 200%; height: 40%; bottom: 8%; pointer-events: none; z-index: 2;
  background: radial-gradient(closest-side, rgba(200, 210, 230, 0.13), transparent) 0 0 / 50% 100% repeat-x;
  filter: blur(6px); animation: drift 38s linear infinite;
}
.fog.f2 { bottom: 0; height: 30%; opacity: 0.8; animation-duration: 55s; animation-direction: reverse; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(25%); } }
.ghosts { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.ghost {
  position: absolute; width: 26px; height: 32px; opacity: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 32'%3E%3Cpath d='M13 1C6 1 2 6 2 13v18l4-3 3 3 4-3 4 3 3-3 4 3V13C24 6 20 1 13 1z' fill='%23ece6d6' fill-opacity='.85'/%3E%3Ccircle cx='9.5' cy='13' r='2' fill='%2307070b'/%3E%3Ccircle cx='16.5' cy='13' r='2' fill='%2307070b'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 8px rgba(236, 230, 214, 0.6));
  animation: haunt 4.5s ease-out forwards;
}
.ghost.ecto { filter: drop-shadow(0 0 12px var(--ecto)); }
@keyframes haunt {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
  15% { opacity: 0.95; }
  100% { opacity: 0; transform: translate(var(--dx, 10px), -150px) scale(1); }
}
.row {
  position: absolute; left: 0; right: 0; bottom: 6%; z-index: 3; display: flex; justify-content: center; align-items: flex-end;
  gap: clamp(8px, 1.6vw, 22px); padding: 0 20px;
}
.mini {
  position: relative; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-decoration: none;
  width: clamp(70px, 9vw, 116px); height: clamp(96px, 12vw, 150px); padding-top: clamp(12px, 1.7vw, 22px);
  background: linear-gradient(170deg, var(--stone-1), var(--stone-2) 45%, var(--stone-3));
  border-radius: 50% 50% 6px 6px / 36% 36% 6px 6px;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.08), inset -8px -14px 24px rgba(0, 0, 0, 0.35), 0 16px 28px rgba(0, 0, 0, 0.6);
  transform-origin: bottom center; animation: emerge 1s cubic-bezier(.2, .9, .3, 1.2) both;
  transition: transform 0.2s;
}
.mini:hover { transform: translateY(-6px); }
/* an old graveyard is never in a straight line */
.mini:nth-child(2n) { height: clamp(88px, 11vw, 136px); margin-bottom: 14px; scale: 0.9; }
.mini:nth-child(3n+1) { rotate: -2.5deg; }
.mini:nth-child(4n+2) { rotate: 2deg; }
.mini:nth-child(5n) { margin-bottom: 26px; scale: 0.82; }
.mini.s1 { border-radius: 8px 8px 6px 6px; clip-path: polygon(14% 0, 86% 0, 100% 10%, 100% 100%, 0 100%, 0 10%); }
.mini.s2 { border-radius: 28% 28% 6px 6px / 16% 16% 6px 6px; padding-top: clamp(20px, 2.6vw, 34px); }
.mini.s2 .m-cross { position: absolute; top: -0.9em; font-size: clamp(22px, 2.6vw, 34px); color: var(--stone-1); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4); }
.mini::before { /* moss and dirt at the foot */
  content: ""; position: absolute; left: -12%; right: -12%; bottom: -10px; height: 20px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(70, 95, 55, 0.9), rgba(20, 28, 16, 0.7) 55%, transparent 72%);
}
.mini .m-cross { font: 800 clamp(12px, 1.3vw, 16px) var(--carve); color: rgba(0, 0, 0, 0.5); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.12); }
.mini .m-sym {
  margin-top: 6%; max-width: 88%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 800 clamp(10px, 1.15vw, 15px) var(--carve); color: #d9d4c6; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.1);
}
.mini .m-why { margin-top: 8%; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--bone-dim)); box-shadow: 0 0 10px var(--c, transparent); }
.mini.fresh::after { /* dust puff when it rises */
  content: ""; position: absolute; left: -30%; right: -30%; bottom: -8px; height: 40px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(160, 140, 110, 0.55), transparent 70%); animation: puff 1.2s ease-out forwards;
}
@keyframes emerge { from { transform: translateY(60%) scaleY(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes puff { from { opacity: 1; transform: scale(0.6); } to { opacity: 0; transform: scale(1.6) translateY(-10px); } }
.scene-caption {
  position: absolute; left: 22px; top: 18px; z-index: 4; margin: 0; padding: 8px 12px; border-radius: 10px;
  background: rgba(7, 7, 11, 0.55); backdrop-filter: blur(6px); font: 12px var(--mono); color: var(--bone-dim); max-width: 70%;
}
.scene-caption b { color: var(--bone); }

/* ---- sections ------------------------------------------------------------ */
.kicker { margin: 0 0 6px; font: 600 12px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ecto); }
h2 { margin: 0; font: clamp(40px, 5vw, 64px) / 0.95 var(--display); text-transform: uppercase; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.section-note { margin: 0; max-width: 420px; color: var(--bone-dim); }

.band {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; align-items: center;
  padding: 36px; margin-bottom: 70px; border-radius: 28px; border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--panel-2), transparent 60%), var(--bg-2);
}
.big-fact { margin: 14px 0 0; font-size: clamp(20px, 2.2vw, 28px); font-style: italic; }
.big-fact b { font: 1.2em var(--display); font-style: normal; color: var(--ecto); letter-spacing: 0.01em; }
.bar { display: flex; height: 22px; border-radius: 999px; overflow: hidden; background: var(--panel-2); }
.bar span { height: 100%; transition: width 0.8s ease; }
.legend { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }
.legend li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.legend .sw { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.legend .pct { margin-left: auto; font: 800 14px var(--mono); }
.legend .cnt { color: var(--faint); font: 12px var(--mono); }
.share-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

.c-nobody_came { --c: #8a8596; }
.c-creator_out { --c: var(--blood); }
.c-pumped_and_faded { --c: var(--candle); }
.c-a_few_came { --c: #d8d0bd; }
.c-graduated_then_faded { --c: var(--ecto); }
.c-self_graduated { --c: #7fb5ff; }
.c-unknown { --c: #4a4855; }
.bar span, .legend .sw { background: var(--c); }

.biggest {
  margin-bottom: 70px; padding: 36px; border-radius: 28px; position: relative; overflow: hidden;
  border: 1px solid rgba(255, 181, 71, 0.25);
  background: radial-gradient(600px 300px at 0% 100%, rgba(255, 181, 71, 0.12), transparent 70%), var(--bg-2);
}
.biggest .kicker { color: var(--candle); }
.biggest-row { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 36px; align-items: center; margin-top: 14px; }
.biggest-line { margin: 0 0 20px; font-size: clamp(22px, 2.8vw, 34px); line-height: 1.25; }
.biggest-line b { color: var(--candle); font-weight: normal; }

/* ---- headstones ---------------------------------------------------------- */
.stones { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 34px 22px; padding-bottom: 20px; }
.empty { color: var(--bone-dim); font-style: italic; grid-column: 1 / -1; padding: 30px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }
.stone {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none;
  padding: 30px 18px 22px; min-height: 300px;
  background:
    radial-gradient(120px 60px at 30% 12%, rgba(255, 255, 255, 0.07), transparent 70%),
    linear-gradient(175deg, var(--stone-1), var(--stone-2) 38%, var(--stone-3) 100%);
  border-radius: 120px 120px 10px 10px / 90px 90px 10px 10px;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.07), inset -10px -20px 34px rgba(0, 0, 0, 0.35), 0 22px 40px rgba(0, 0, 0, 0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease; animation: emerge 0.8s cubic-bezier(.2, .9, .3, 1.15) both;
}
.stone::before { /* a hairline crack */
  content: ""; position: absolute; right: 18%; top: 22%; width: 28px; height: 60px; opacity: 0.5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 60'%3E%3Cpath d='M20 0l-6 14 5 8-9 14 4 9-6 15' stroke='%23181a20' stroke-width='1.4' fill='none'/%3E%3C/svg%3E") no-repeat;
}
.stone::after { /* moss at the foot */
  content: ""; position: absolute; left: -10px; right: -10px; bottom: -12px; height: 26px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(80, 110, 60, 0.75), rgba(25, 35, 20, 0.6) 55%, transparent 72%);
}
.stone:hover { transform: translateY(-6px) rotate(-0.6deg); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.09), 0 30px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(166, 255, 92, 0.12); }
.stone .orn { font: 800 22px var(--carve); color: rgba(0, 0, 0, 0.45); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.12); }
.stone .rip { font: 800 11px var(--carve); letter-spacing: 0.3em; color: rgba(0, 0, 0, 0.55); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.1); margin-top: 2px; }
.stone .sym {
  margin-top: 10px; font: 800 26px var(--carve); word-break: break-all; color: #e2ddcf;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.12);
}
.stone .name { color: #b8b2a4; font-size: 15px; margin-top: 2px; word-break: break-word; }
.stone .dates { font: 12px var(--mono); color: rgba(226, 221, 207, 0.55); margin-top: 8px; }
.stone .cause {
  margin-top: 12px; font: 600 12px var(--mono); padding: 5px 11px; border-radius: 999px;
  color: var(--c, var(--bone)); background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.08);
}
.stone .epitaph { font-style: italic; margin-top: 12px; font-size: 16px; color: #ece6d6; line-height: 1.3; }
.stone .meta { margin-top: auto; padding-top: 14px; font: 12px var(--mono); color: rgba(226, 221, 207, 0.6); }
.stone .meta b { color: var(--candle); font-weight: 600; }

/* ---- grave & creator pages ---------------------------------------------- */
.back { display: inline-block; margin: 26px 0 18px; color: var(--bone-dim); text-decoration: none; font: 13px var(--mono); }
.back:hover { color: var(--ecto); }
.grave { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 40px; margin: 0 0 60px; align-items: start; }
.grave .stone { min-height: 420px; animation: none; cursor: default; }
.grave .stone:hover { transform: none; }
.grave .stone .sym { font-size: 34px; }
.page-title { margin: 0 0 18px; font: clamp(44px, 6vw, 84px) / 0.92 var(--display); text-transform: uppercase; }
.page-title .glow { display: block; }
/* Addresses are case-sensitive: never uppercase one, or it names another wallet. */
.page-title .addr { text-transform: none; font-family: var(--mono); font-weight: 800; font-size: 0.5em; letter-spacing: 0; margin-top: 0.25em; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fact { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; }
.fact .k { display: block; color: var(--bone-dim); font: 11px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }
.fact .v { font: 600 17px var(--mono); word-break: break-all; }
.fact a.v { color: var(--ecto); text-decoration: none; }
.chart { width: 100%; height: 190px; margin: 16px 0; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(166, 255, 92, 0.05), transparent); }
.chart polyline { fill: none; stroke: var(--ecto); stroke-width: 2.4; vector-effect: non-scaling-stroke; }
.links-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.note { color: var(--bone-dim); font-style: italic; font-size: 15px; }
.sheet { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 20px; }
.sheet td, .sheet th { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.sheet th { color: var(--bone-dim); font: 11px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }
.sheet .mono { font-family: var(--mono); }
.sheet a { color: var(--ecto); text-decoration: none; }

.foot { padding-top: 50px; padding-bottom: 50px; border-top: 1px solid var(--line); margin-top: 40px; }
.foot-logo { font: 48px var(--display); color: rgba(236, 230, 214, 0.08); letter-spacing: 0.02em; }
.foot p { color: var(--faint); font-size: 14px; font-style: italic; max-width: 760px; }

/* ---- the scene, alive ---------------------------------------------------- */
.scene { --px: 0; --py: 0; }
.sky .layer { transform-box: view-box; transform-origin: 50% 100%; transition: transform 0.7s cubic-bezier(.2, .7, .2, 1); }
.sky .l-far { transform: translate(calc(var(--px) * -6px), calc(var(--py) * -4px)); }
.sky .l-mid { transform: translate(calc(var(--px) * -12px), calc(var(--py) * -5px)) scale(1.03); }
.sky .l-trees { transform: translate(calc(var(--px) * -20px), calc(var(--py) * -7px)) scale(1.04); }
.sky .l-near { transform: translate(calc(var(--px) * -28px), calc(var(--py) * -6px)) scale(1.05); }
.field { transition: transform 0.7s cubic-bezier(.2, .7, .2, 1); transform: translate(calc(var(--px) * -16px), calc(var(--py) * -5px)); }
.row { transition: transform 0.7s cubic-bezier(.2, .7, .2, 1); transform: translate(calc(var(--px) * -34px), calc(var(--py) * -6px)); }
.critters { position: absolute; inset: 0; pointer-events: none; z-index: 2; transition: transform 0.7s cubic-bezier(.2, .7, .2, 1); transform: translate(calc(var(--px) * -18px), calc(var(--py) * -5px)); }

.cloud { animation: cloudDrift 100s linear infinite; }
.cloud.c1 { animation-delay: -62s; }
.cloud.c2 { animation-duration: 140s; animation-delay: -20s; opacity: 0.9; }
.cloud.c3 { animation-duration: 120s; animation-delay: -95s; opacity: 0.75; }
@keyframes cloudDrift { from { transform: translateX(-260px); } to { transform: translateX(1720px); } }
.moon-halo { transform-box: fill-box; transform-origin: center; animation: halo 7s ease-in-out infinite; }
@keyframes halo { 50% { transform: scale(1.08); opacity: 0.75; } }
.tree { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 8s ease-in-out infinite; }
.tree.t2 { animation-duration: 9.5s; animation-delay: -3s; }
@keyframes sway { 0%, 100% { transform: rotate(-0.9deg); } 50% { transform: rotate(0.9deg); } }
.digger .shovel { transform-box: view-box; transform-origin: 1208px 412px; animation: dig 2.6s ease-in-out infinite; }
@keyframes dig { 0%, 100% { transform: rotate(0deg); } 35% { transform: rotate(-28deg); } 55% { transform: rotate(14deg); } 70% { transform: rotate(4deg); } }

.bat { position: absolute; left: -40px; width: 34px; height: 18px; animation: batFly var(--dur, 9s) linear forwards; }
.bat i {
  display: block; width: 100%; height: 100%; animation: flap 0.22s ease-in-out infinite;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 18'%3E%3Cpath d='M17 11C15 6 9 2 0 4c5 2 7 6 6 10 3-2 6-2 7 1 1-2 3-3 4-1 1-2 3-1 4 1 1-3 4-3 7-1-1-4 1-8 6-10-9-2-15 2-17 7z' fill='%2305060a'/%3E%3C/svg%3E") center / contain no-repeat;
}
@keyframes flap { 50% { transform: scaleY(0.35); } }
@keyframes batFly {
  0% { transform: translate(0, 0); } 25% { transform: translate(calc(var(--dx) * 0.25), -22px); }
  50% { transform: translate(calc(var(--dx) * 0.5), 12px); } 75% { transform: translate(calc(var(--dx) * 0.75), -16px); }
  100% { transform: translate(var(--dx), 6px); }
}
.wisp {
  position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--ecto); opacity: 0;
  box-shadow: 0 0 10px 3px rgba(166, 255, 92, 0.6), 0 0 28px 8px rgba(166, 255, 92, 0.22);
  animation: wisp var(--dur, 9s) ease-in-out infinite; animation-delay: var(--delay, 0s);
}
@keyframes wisp {
  0% { opacity: 0; transform: translate(0, 0); } 20% { opacity: 0.85; }
  50% { opacity: 0.5; transform: translate(var(--wx), var(--wy)); } 80% { opacity: 0.85; }
  100% { opacity: 0; transform: translate(calc(var(--wx) * -0.6), calc(var(--wy) * 0.5)); }
}
.shoot {
  position: absolute; width: 130px; height: 2px; border-radius: 2px; transform: rotate(16deg); opacity: 0;
  background: linear-gradient(90deg, rgba(236, 230, 214, 0), rgba(236, 230, 214, 0.95));
  animation: shoot 1.2s ease-out forwards;
}
@keyframes shoot { 15% { opacity: 1; } to { opacity: 0; translate: 380px 110px; } }
.newcross { position: absolute; width: 14px; height: 18px; translate: -50% -50%; animation: newcross 2.8s ease-out forwards; }
.newcross::before, .newcross::after { content: ""; position: absolute; background: var(--ecto); box-shadow: 0 0 10px var(--ecto); border-radius: 1px; }
.newcross::before { left: 6px; top: 0; width: 2px; height: 18px; }
.newcross::after { left: 1px; top: 5px; width: 12px; height: 2px; }
@keyframes newcross { 0% { scale: 0; opacity: 0; } 15% { scale: 1.6; opacity: 1; } 40% { scale: 1; } 100% { opacity: 0; } }

/* ---- flowers left at the grave ------------------------------------------ */
.plot { position: relative; }
.flowerbed { position: absolute; left: 4%; right: 4%; bottom: -16px; height: 60px; pointer-events: none; z-index: 2; }
.flower { position: absolute; bottom: 0; font-size: 32px; line-height: 1; transform-origin: 50% 100%; transform: rotate(var(--r, 0deg)) scale(var(--s, 1)); filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.6)); }
.flower.drop { animation: flowerDrop 1s cubic-bezier(.3, .9, .4, 1.2) both; }
@keyframes flowerDrop {
  0% { transform: translateY(-300px) rotate(-50deg) scale(var(--s, 1)); opacity: 0; }
  55% { opacity: 1; }
  80% { transform: translateY(5px) rotate(var(--r, 0deg)) scale(var(--s, 1)); }
  100% { transform: translateY(0) rotate(var(--r, 0deg)) scale(var(--s, 1)); }
}
.flower-more { position: absolute; right: -8px; bottom: 40px; font: 800 12px var(--mono); color: var(--candle); background: rgba(0, 0, 0, 0.65); padding: 3px 8px; border-radius: 999px; }
.stone .bed { position: absolute; left: 10%; right: 10%; bottom: -10px; height: 30px; pointer-events: none; z-index: 2; }
.stone .bed .flower { font-size: 17px; }
.mini .m-fl { position: absolute; bottom: -9px; left: 50%; translate: -50% 0; font-size: 15px; z-index: 2; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6)); }

/* ---- the night around the page ------------------------------------------ */
.atmos { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.sky-a, .sky-b {
  position: absolute; inset: 0;
  mask-image: linear-gradient(#000 0%, rgba(0, 0, 0, 0.8) 45%, transparent 90%);
  -webkit-mask-image: linear-gradient(#000 0%, rgba(0, 0, 0, 0.8) 45%, transparent 90%);
}
.sky-a {
  opacity: 0.55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' fill='%23ece6d6'%3E%3Ccircle cx='23' cy='41' r='.9'/%3E%3Ccircle cx='141' cy='87' r='.7'/%3E%3Ccircle cx='262' cy='19' r='1.1'/%3E%3Ccircle cx='388' cy='64' r='.8'/%3E%3Ccircle cx='77' cy='171' r='.7'/%3E%3Ccircle cx='203' cy='212' r='1'/%3E%3Ccircle cx='331' cy='158' r='.7'/%3E%3Ccircle cx='12' cy='298' r='.8'/%3E%3Ccircle cx='158' cy='331' r='.7'/%3E%3Ccircle cx='289' cy='282' r='.9'/%3E%3Ccircle cx='401' cy='371' r='.7'/%3E%3Ccircle cx='96' cy='402' r='.9'/%3E%3Ccircle cx='238' cy='389' r='.6'/%3E%3C/svg%3E") 0 0 / 420px 420px;
}
.sky-b {
  animation: skyTwinkle 6s ease-in-out infinite;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='290' height='290' fill='%23fffbe6'%3E%3Ccircle cx='52' cy='33' r='1.2'/%3E%3Ccircle cx='190' cy='61' r='.9'/%3E%3Ccircle cx='121' cy='148' r='1.3'/%3E%3Ccircle cx='261' cy='203' r='1'/%3E%3Ccircle cx='31' cy='241' r='.9'/%3E%3C/svg%3E") 70px 40px / 290px 290px;
}
@keyframes skyTwinkle { 0%, 100% { opacity: 0.7; } 50% { opacity: 0.2; } }
.glow-moon { position: absolute; inset: 0; background: radial-gradient(520px 380px at 97% 2%, rgba(233, 225, 195, 0.08), transparent 70%); }
.glow-ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 55vh;
  background:
    radial-gradient(42% 75% at 0% 100%, rgba(95, 115, 165, 0.17), transparent 72%),
    radial-gradient(42% 75% at 100% 100%, rgba(95, 115, 165, 0.17), transparent 72%);
}
.edge { position: absolute; bottom: 0; display: none; width: clamp(180px, calc((100vw - 1240px) / 2 + 40px), 400px); height: auto; aspect-ratio: 360 / 260; }
.edge-l { left: 0; }
.edge-r { right: 0; }
.edge .lantern { transform-box: view-box; transform-origin: 202px 115px; animation: lanternSway 5s ease-in-out infinite; }
@keyframes lanternSway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.edge .flame { animation: flicker 2.3s steps(1) infinite; }
.edge .lglow { transform-box: fill-box; transform-origin: center; animation: lglow 2.3s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { opacity: 1; } 12% { opacity: 0.7; } 18% { opacity: 0.95; } 47% { opacity: 0.8; } 52% { opacity: 1; } 80% { opacity: 0.75; } }
@keyframes lglow { 0%, 100% { opacity: 1; transform: scale(1); } 30% { opacity: 0.75; transform: scale(0.94); } 60% { opacity: 0.92; transform: scale(1.03); } }
.edge .crow { transform-box: fill-box; transform-origin: 40% 100%; animation: crow 9s ease-in-out infinite; }
@keyframes crow { 0%, 70%, 100% { transform: rotate(0); } 73% { transform: rotate(-9deg); } 78% { transform: rotate(2deg); } 82% { transform: rotate(-9deg); } 88% { transform: rotate(0); } }
.page-fog {
  position: absolute; left: -50%; width: 200%; bottom: -4vh; height: 30vh;
  background: radial-gradient(closest-side, rgba(200, 210, 230, 0.075), transparent) 0 0 / 25% 100% repeat-x;
  filter: blur(10px); animation: drift 80s linear infinite;
}
.ff {
  position: absolute; display: none; width: 5px; height: 5px; border-radius: 50%; background: var(--ecto); opacity: 0;
  box-shadow: 0 0 9px 3px rgba(166, 255, 92, 0.5), 0 0 24px 7px rgba(166, 255, 92, 0.18);
  animation: wisp var(--dur, 10s) ease-in-out infinite; animation-delay: var(--delay, 0s);
}
.ff:nth-of-type(1) { left: 3%; bottom: 14vh; --dur: 11s; --wx: 40px; --wy: -30px; }
.ff:nth-of-type(2) { left: 8%; bottom: 26vh; --dur: 13s; --delay: -5s; --wx: -30px; --wy: -24px; }
.ff:nth-of-type(3) { left: 12%; bottom: 8vh; --dur: 9s; --delay: -2s; --wx: 26px; --wy: -40px; }
.ff:nth-of-type(4) { right: 4%; bottom: 18vh; --dur: 12s; --delay: -7s; --wx: -36px; --wy: -28px; }
.ff:nth-of-type(5) { right: 10%; bottom: 9vh; --dur: 10s; --delay: -3s; --wx: 30px; --wy: -34px; }
.ff:nth-of-type(6) { right: 14%; bottom: 28vh; --dur: 14s; --delay: -9s; --wx: -24px; --wy: -20px; }
@media (min-width: 1400px) { .edge, .ff { display: block; } }

/* ---- X links ------------------------------------------------------------- */
.x-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line);
  font: 600 12px var(--mono); color: var(--bone-dim); text-decoration: none; white-space: nowrap; transition: color 0.2s, border-color 0.2s;
}
.x-link svg { width: 13px; height: 13px; fill: currentColor; flex: none; }
.x-link:hover { color: var(--bone); border-color: rgba(236, 230, 214, 0.3); }
@media (max-width: 1180px) { .nav .x-link span { display: none; } }
.foot-row { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin: 6px 0 4px; }
.foot-warn { font: 12px var(--mono); color: var(--candle); }

/* ---- side rails: wide screens only --------------------------------------- */
.rail { display: none; }
@media (min-width: 1700px) {
  .rail {
    position: fixed; top: 96px; z-index: 5; display: flex; flex-direction: column; gap: 12px;
    width: clamp(190px, calc((100vw - 1240px) / 2 - 40px), 310px); max-height: calc(100vh - 290px);
  }
  .rail-l { left: 20px; height: calc(100vh - 330px); min-height: 300px; }
  .rail-r { right: 20px; }
}
.rail-card {
  margin: 0; padding: 14px 14px 12px; border-radius: 18px; border: 1px solid var(--line);
  background: rgba(13, 14, 21, 0.8); backdrop-filter: blur(10px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rail-title { margin: 0; font: 19px var(--display); letter-spacing: 0.04em; text-transform: uppercase; }
.rail-sub { margin: 2px 0 10px; font: 11px var(--mono); color: var(--bone-dim); }
.rail-live, .rail-tag { display: inline-flex; align-items: center; gap: 6px; font: 800 10px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ecto); }
.rail-tag { color: var(--candle); letter-spacing: 0.06em; }
.rail-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--ecto); box-shadow: 0 0 8px var(--ecto); animation: pulse 1.6s infinite; }
.rail-empty { list-style: none; padding: 14px 4px; color: var(--bone-dim); font-style: italic; font-size: 14px; }

.feed-card { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.feed {
  flex: 1; min-height: 0; overflow: hidden;
  mask-image: linear-gradient(#000 70%, transparent); -webkit-mask-image: linear-gradient(#000 70%, transparent);
}
.fi {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 8px;
  padding: 8px 6px 8px 18px; border-bottom: 1px solid var(--line); text-decoration: none;
  animation: fiIn 0.7s cubic-bezier(.2, .9, .3, 1.1) both;
}
.fi.seed { animation: none; }
.fi::before { content: ""; position: absolute; left: 5px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--bone-dim)); box-shadow: 0 0 8px var(--c, transparent); }
.fi-sym { font: 700 13px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi-t { font: 11px var(--mono); color: var(--faint); }
.fi-why { grid-column: 1 / -1; font-size: 13px; font-style: italic; color: var(--bone-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi.big { border-radius: 10px; background: linear-gradient(90deg, rgba(255, 181, 71, 0.12), transparent 80%); }
.fi.big .fi-sym { color: var(--candle); }
.fi:hover .fi-sym { color: var(--ecto); }
.c-risen { --c: #c9b6ff; }
@keyframes fiIn {
  from { opacity: 0; transform: translateY(-12px); background-color: rgba(166, 255, 92, 0.14); }
  60% { background-color: rgba(166, 255, 92, 0.06); }
  to { opacity: 1; transform: none; background-color: transparent; }
}

.top-card { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.top {
  flex: 1; min-height: 0; overflow: hidden; margin: 0; padding: 0; list-style: none;
  mask-image: linear-gradient(#000 85%, transparent); -webkit-mask-image: linear-gradient(#000 85%, transparent);
}
.tr {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 1px 8px; align-items: baseline;
  padding: 7px 4px; border-bottom: 1px solid var(--line); text-decoration: none; border-radius: 8px;
}
.tr:hover { background: var(--panel-2); }
.tr-n { font: 800 12px var(--mono); color: var(--faint); }
.top li:nth-child(-n+3) .tr-n { color: var(--candle); }
.tr-sym { font: 700 13px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-v { font: 800 13px var(--mono); color: var(--candle); }
.tr-why { grid-column: 2 / -1; font: 11px var(--mono); color: var(--c, var(--bone-dim)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bags { flex: none; }
.bags .rail-sub { margin-bottom: 9px; }
.bags input {
  width: 100%; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--bone); font: 12px var(--mono); outline: none;
}
.bags input:focus { border-color: var(--ecto); box-shadow: 0 0 0 3px rgba(166, 255, 92, 0.12); }
.bags .btn { width: 100%; justify-content: center; margin-top: 8px; padding: 10px 14px; }
.bags .visit-err { margin-top: 6px; min-height: 0; font-size: 11px; }
.follow { flex: none; display: flex; align-items: center; gap: 12px; text-decoration: none; transition: border-color 0.2s, transform 0.15s; }
.follow svg { width: 34px; height: 34px; flex: none; padding: 8px; border-radius: 50%; background: var(--bone); fill: #07070b; }
.follow b { display: block; font: 700 13px var(--mono); }
.follow small { display: block; color: var(--bone-dim); font-size: 12px; font-style: italic; line-height: 1.3; }
.follow:hover { border-color: rgba(166, 255, 92, 0.4); transform: translateY(-1px); }

/* ---- smaller screens ------------------------------------------------------ */
@media (max-width: 980px) {
  .links { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 44px; }
  .band, .biggest-row, .grave { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  main, .foot { padding: 0 16px; }
  .nav { padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
  .search { order: 3; width: 100%; }
  .nav .x-link { margin-left: auto; }
  .hero { padding: 34px 0 30px; }
  .mini-stats .n { font-size: 18px; }
  .scene { border-radius: 20px; height: 380px; }
  .row { justify-content: flex-start; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .band, .biggest { padding: 24px; }
  .legend { grid-template-columns: 1fr; }
  .stones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 12px; }
  .stone { min-height: 250px; padding: 24px 10px 16px; }
  .stone .sym { font-size: 19px; }
  .facts { grid-template-columns: 1fr; }
  .scene-caption { max-width: calc(100% - 44px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ghost { display: none; }
}
