@font-face { font-family: "Archivo Black"; src: url("/fonts/ArchivoBlack-Regular.ttf"); font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/Poppins-Regular.ttf"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/Poppins-Medium.ttf"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/Poppins-Bold.ttf"); font-weight: 700; font-display: swap; }

:root {
  --sea1: #0b2a6b; --sea2: #04081f; --lime: #d4ff3a; --ink: #0b1020;
  --paper: #fbf9f3; --line: #e4dfd2; --muted: #6b6f7d; --in: #13a26b; --out: #e0464e;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { background: var(--sea2); }
body {
  margin: 0; color: #fff; font-family: Poppins, system-ui, sans-serif; line-height: 1.5;
  background: radial-gradient(1200px 600px at 70% -10%, #1f5fd0 0%, transparent 60%), linear-gradient(180deg, var(--sea1), var(--sea2) 70%);
  min-height: 100vh;
}
a { color: inherit; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 18px clamp(16px, 4vw, 48px); }
.logo { font-family: "Archivo Black", sans-serif; text-decoration: none; font-size: 20px; letter-spacing: .3px; }
.logo-mark { color: var(--lime); }
.top-note { font-size: 13px; opacity: .7; }
.top-nav { display: flex; gap: 18px; align-items: center; }
.top-nav a { font-weight: 700; text-decoration: none; color: var(--lime); }

.hero { max-width: 860px; margin: 0 auto; padding: 48px 20px 24px; text-align: center; }
h1 { font-family: "Archivo Black", sans-serif; font-size: clamp(36px, 6vw, 68px); line-height: 1.05; margin: 0 0 16px; }
.hl { color: var(--lime); }
.lead { font-size: 18px; opacity: .85; max-width: 640px; margin: 0 auto 28px; }
.form { display: grid; grid-template-columns: 1fr auto; gap: 10px; background: #ffffff14; border: 1px solid #ffffff2a; padding: 10px; border-radius: 22px; }
.wallets { grid-column: 1 / -1; display: grid; gap: 8px; }
.wallet-row { display: flex; gap: 8px; }
.wallet-row input { flex: 1; min-width: 0; font: 500 16px var(--mono); padding: 16px 18px; border-radius: 14px; border: 0; background: #fff; color: var(--ink); }
.wallet-row .rm { background: #ffffff22; color: #fff; padding: 0 16px; border-radius: 14px; font-size: 20px; }
.add-wallet { grid-column: 1 / -1; justify-self: start; background: none; color: var(--lime); padding: 4px 6px; font-size: 14px; }
.add-wallet span { color: #fff; opacity: .6; font-weight: 400; }
.dates { display: flex; gap: 10px; flex-wrap: wrap; }
.dates label { font-size: 13px; display: flex; align-items: center; gap: 6px; background: #ffffff12; padding: 6px 10px; border-radius: 12px; }
.dates input { font: inherit; border: 0; border-radius: 8px; padding: 6px 8px; color: var(--ink); }
button, .btn { font: 700 15px Poppins, sans-serif; border: 0; cursor: pointer; border-radius: 999px; padding: 14px 24px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
#go { background: var(--lime); color: var(--ink); }
.try { font-size: 14px; opacity: .8; }
.error { background: #ff4f5a22; border: 1px solid #ff4f5a66; padding: 12px 16px; border-radius: 12px; }

.loading { text-align: center; padding: 40px 0 80px; }
.bubbles { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; }
.bubbles span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #ffffffaa; animation: rise 1.2s infinite ease-in-out; }
.bubbles span:nth-child(2) { animation-delay: .2s; } .bubbles span:nth-child(3) { animation-delay: .4s; }
@keyframes rise { 0%,100% { transform: translateY(0); opacity: .4 } 50% { transform: translateY(-14px); opacity: 1 } }

main { max-width: 1100px; margin: 0 auto; padding: 0 20px 60px; }
.share-zone { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: center; margin: 12px 0 36px; }
.card-img { width: 100%; height: auto; border-radius: 20px; box-shadow: 0 24px 70px #0009; display: block; background: #0b2a6b; aspect-ratio: 1200 / 630; }
.kicker { text-transform: uppercase; letter-spacing: 3px; font-size: 12px; color: var(--lime); margin: 0; font-weight: 700; }
.share-side h2 { font-family: "Archivo Black", sans-serif; font-size: 48px; margin: 4px 0 0; line-height: 1.1; }
.tier-line { margin: 4px 0 14px; opacity: .85; }
.tier-bar { height: 10px; background: #ffffff22; border-radius: 99px; overflow: hidden; }
#tier-fill { height: 100%; background: var(--lime); border-radius: 99px; width: 0; transition: width .8s; }
.muted { color: inherit; opacity: .65; font-size: 14px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.btn-x { background: #fff; color: #000; }
.btn-ghost { background: #ffffff18; color: inherit; border: 1px solid #ffffff33; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { background: var(--lime); color: var(--ink); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 700; }
.badge small { font-weight: 500; opacity: .75; margin-left: 6px; }

/* The statement itself: a paper document on the ocean. */
.paper { background: var(--paper); color: var(--ink); border-radius: 18px; padding: clamp(20px, 4vw, 48px); box-shadow: 0 30px 80px #0008; }
.paper-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 3px double var(--ink); padding-bottom: 14px; }
.doc-title { font-family: "Archivo Black", sans-serif; font-size: clamp(22px, 3vw, 32px); margin: 0; letter-spacing: 1px; }
.doc-sub { margin: 0; color: var(--muted); font-size: 14px; }
.stamp { border: 3px solid var(--out); color: var(--out); font-family: "Archivo Black", sans-serif; padding: 6px 14px; border-radius: 10px; transform: rotate(-6deg); font-size: 18px; text-transform: uppercase; white-space: nowrap; }
.meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0 8px; }
.meta dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; }
.meta dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.mono { font-family: var(--mono); font-size: 14px; }
.paper h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 2px; margin: 34px 0 12px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.paper h3 .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sum { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.sum span { display: block; font-size: 13px; color: var(--muted); }
.sum b { font-family: var(--mono); font-size: clamp(18px, 2.2vw, 26px); overflow-wrap: anywhere; }
.sum.in b { color: var(--in); } .sum.out b { color: var(--out); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
.kv { margin-top: 14px; }
.kv td { padding: 9px 4px; border-bottom: 1px dashed var(--line); }
.kv td:last-child { text-align: right; font-family: var(--mono); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.list td { padding: 9px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.list td.num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.list .who { font-weight: 500; overflow-wrap: anywhere; }
.list .who small { display: block; font-family: var(--mono); color: var(--muted); font-weight: 400; font-size: 12px; }
.list.small td { padding: 6px 4px; font-size: 13px; }
.tag { display: inline-block; font-size: 11px; background: #eceaf6; color: #4b3fa8; border-radius: 6px; padding: 1px 6px; margin-left: 6px; font-weight: 500; }
.bars { display: grid; gap: 10px; margin-bottom: 12px; }
.bar-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.bar-track { height: 14px; background: #eeeae0; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #2147a8, #3f86ff); border-radius: 99px; }
.bar-row .v { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.months { display: grid; grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr)); gap: 6px; align-items: end; height: 180px; border-bottom: 1px solid var(--line); }
.month { display: flex; gap: 2px; align-items: flex-end; height: 100%; position: relative; }
.month i { flex: 1; border-radius: 4px 4px 0 0; min-height: 2px; }
.month i.in { background: var(--in); } .month i.out { background: var(--out); }
.month-labels { display: grid; grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr)); gap: 6px; font-size: 11px; color: var(--muted); text-align: center; margin-top: 4px; }
.legend { font-size: 13px; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 10px; vertical-align: middle; }
.dot.in { background: var(--in); } .dot.out { background: var(--out); }
.highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hl-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.hl-card span { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.hl-card b { display: block; font-size: 20px; margin: 4px 0 2px; overflow-wrap: anywhere; }
.hl-card p { margin: 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.ledger-wrap { overflow-x: auto; max-height: 560px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.ledger th { position: sticky; top: 0; background: var(--ink); color: #fff; text-align: left; font-weight: 500; padding: 10px; font-size: 13px; }
.ledger td { padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ledger tr:nth-child(even) td { background: #f4f1e8; }
.ledger .num { text-align: right; font-family: var(--mono); }
.ledger .in { color: var(--in); } .ledger .out { color: var(--out); }
.ledger .desc { white-space: normal; min-width: 260px; }
.ledger .desc a { color: var(--muted); font-size: 12px; margin-left: 6px; }
.foot { margin-top: 24px; font-size: 12px; color: var(--muted); border-top: 3px double var(--ink); padding-top: 12px; }
.foot p { margin: 4px 0; }
.paper-actions { margin-top: 16px; text-align: right; }
.paper-actions .btn-ghost { color: var(--ink); border-color: var(--line); background: #fff; }
.site-foot { text-align: center; font-size: 12px; opacity: .55; padding: 24px; }

@media (max-width: 820px) {
  .share-zone, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .summary, .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .highlights { grid-template-columns: minmax(0, 1fr); }
  .form { grid-template-columns: minmax(0, 1fr); }
  .top-note { display: none; }
  .paper-head { flex-direction: column; }
  .stamp { white-space: normal; font-size: 15px; }
  .share-side h2 { font-size: 38px; }
}
@media print {
  body, html { background: #fff; }
  .top, .hero, .share-zone, .site-foot, .paper-actions, .loading { display: none !important; }
  main { padding: 0; max-width: none; }
  .paper { box-shadow: none; border-radius: 0; padding: 0; }
  .ledger-wrap { max-height: none; overflow: visible; }
  .ledger th { position: static; }
}

.btn-lime { background: var(--lime); color: var(--ink); }
.join-box { margin-top: 18px; }
.join-box p { margin: 8px 0 0; min-height: 1em; }
.ref-box { margin-top: 18px; background: #160f3ced; backdrop-filter: blur(8px); border: 1px solid #ffffff25; border-radius: 16px; padding: 14px; }
.ref-row { display: flex; gap: 8px; margin: 8px 0 6px; }
.ref-row input { flex: 1; min-width: 0; font: 13px var(--mono); border: 0; border-radius: 10px; padding: 10px; background: #fff; color: var(--ink); }
.ref-row .btn { padding: 10px 16px; }
.sub-h { font-size: 13px; color: var(--muted); margin: 0 0 8px; text-transform: uppercase; letter-spacing: 1.5px; }
.small-note { font-size: 13px; color: var(--muted); opacity: 1; margin-top: 10px; }
.pnl-pos { color: var(--in); } .pnl-neg { color: var(--out); }
.board { max-width: 1100px; margin: 20px auto 0; padding: 0 20px; }
.board-title { font-family: "Archivo Black", sans-serif; font-size: clamp(28px, 4vw, 42px); margin: 30px 0 4px; text-align: center; }
.lead.small { font-size: 15px; text-align: center; margin-bottom: 20px; }
.board-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; }
.board-card { background: #ffffff10; border: 1px solid #ffffff25; border-radius: 20px; padding: 18px 20px; min-width: 0; }
.board-card h3 { margin: 0 0 10px; font-size: 18px; }
.board-list { list-style: none; margin: 0; padding: 0; }
.board-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #ffffff18; }
.board-list li:last-child { border-bottom: 0; }
.board-list .rk { font-family: "Archivo Black", sans-serif; color: var(--lime); }
.board-list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.board-list .nm small { display: block; opacity: .6; font-weight: 400; font-size: 12px; }
.board-list .vl { font-family: var(--mono); font-size: 14px; }
.board-list .empty { display: block; opacity: .65; font-size: 14px; border: 0; }
@media (max-width: 520px) { .list td { font-size: 12.5px; padding-left: 2px; padding-right: 2px; } .list td.num { white-space: nowrap; } }
@media (max-width: 820px) { .board-grid { grid-template-columns: minmax(0, 1fr); } .top-nav .top-note { display: none; } }
@media print { .board { display: none !important; } }

/* ================= 3D ocean scene ================= */
body { background: var(--sea2); }
.top, .hero, .loading, main, .board, .site-foot { position: relative; z-index: 2; }
.ocean { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(1200px 700px at 70% -10%, #2a74e6 0%, transparent 60%), linear-gradient(180deg, #0d3480 0%, #071a4d 45%, var(--sea2) 100%);
  perspective: 900px; }
.rays { position: absolute; inset: -10% 0 0; }
.rays span { position: absolute; top: -10%; width: 140px; height: 130%; background: linear-gradient(180deg, rgba(255,255,255,.14), transparent 75%);
  transform-origin: top center; filter: blur(6px); animation: ray 9s ease-in-out infinite alternate; }
.rays span:nth-child(1) { left: 8%; transform: rotate(14deg); }
.rays span:nth-child(2) { left: 30%; width: 90px; transform: rotate(9deg); animation-delay: -3s; }
.rays span:nth-child(3) { left: 52%; width: 170px; transform: rotate(5deg); animation-delay: -6s; }
.rays span:nth-child(4) { left: 72%; width: 80px; transform: rotate(-2deg); animation-delay: -1s; }
.rays span:nth-child(5) { left: 88%; width: 120px; transform: rotate(-8deg); animation-delay: -4s; }
@keyframes ray { from { opacity: .35; } to { opacity: .9; } }
.bubbles-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.layer { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .25s ease-out; }
.layer.far { transform: translate3d(calc(var(--mx, 0) * -14px), calc(var(--my, 0) * -10px), -200px) scale(1.2); filter: saturate(.8); }
.layer.mid { transform: translate3d(calc(var(--mx, 0) * -32px), calc(var(--my, 0) * -22px), 0); }
.layer.near { transform: translate3d(calc(var(--mx, 0) * -60px), calc(var(--my, 0) * -40px), 120px); }
.floater { position: absolute; animation: bob var(--dur, 12s) ease-in-out var(--delay, 0s) infinite alternate; transform-style: preserve-3d; }
@keyframes bob { from { transform: translate3d(0, 0, 0) rotate(-4deg); } to { transform: translate3d(26px, -46px, 0) rotate(5deg); } }

/* Spinning 3D coin with real thickness (stacked rims). */
.coin3d { --s: 70px; position: relative; width: var(--s); height: var(--s); transform-style: preserve-3d; animation: spin var(--spin, 6s) linear infinite; }
.floater .coin3d { animation-duration: inherit; }
.floater { --spin: 6s; }
.floater .coin3d { animation: spin var(--spin) linear infinite; }
@keyframes spin { from { transform: rotateX(12deg) rotateY(0deg); } to { transform: rotateX(12deg) rotateY(360deg); } }
.coin3d .face, .coin3d .rim { position: absolute; inset: 0; border-radius: 50%; }
.coin3d .rim { background: var(--c2); }
.coin3d .face { display: grid; place-items: center; font: 900 calc(var(--s) * .22) "Archivo Black", sans-serif; color: rgba(11,16,32,.78);
  background: radial-gradient(circle at 32% 28%, #fff 0%, var(--c1) 22%, var(--c2) 100%);
  box-shadow: inset 0 0 0 calc(var(--s) * .06) rgba(255,255,255,.35), inset 0 -6px 14px rgba(0,0,0,.25); backface-visibility: hidden; letter-spacing: -.5px; }
.coin3d .face.long { font-size: calc(var(--s) * .14); }
.coin3d .back { transform: rotateY(180deg) translateZ(7.5px); }
.coin3d .front { transform: translateZ(1px); }

/* Floating NFT frames */
.nft3d { width: 92px; padding: 8px 8px 6px; background: linear-gradient(160deg, #ffffff, #e9e4ff); border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.35);
  transform-style: preserve-3d; animation: sway var(--sway, 8s) ease-in-out infinite alternate; }
.nft3d canvas { width: 100%; aspect-ratio: 1; image-rendering: pixelated; border-radius: 8px; display: block; }
.nft3d span { display: block; font: 700 11px var(--mono); color: #2b2f45; margin-top: 5px; }
@keyframes sway { from { transform: rotateY(-28deg) rotateX(8deg); } to { transform: rotateY(28deg) rotateX(-6deg); } }

/* Swimming creatures */
.swimmer { position: absolute; left: 0; width: var(--w, 120px); animation: swim var(--swim, 40s) linear var(--delay, 0s) infinite; }
.swimmer img { width: 100%; display: block; animation: wiggle 2.4s ease-in-out infinite alternate; filter: drop-shadow(0 10px 18px rgba(0,0,0,.3)); }
.swimmer.left { animation-name: swimLeft; }
.swimmer.left img { transform: scaleX(-1); animation-name: wiggleL; }
@keyframes swim { from { transform: translateX(-25vw); } to { transform: translateX(125vw); } }
@keyframes swimLeft { from { transform: translateX(125vw); } to { transform: translateX(-25vw); } }
@keyframes wiggle { from { transform: translateY(-8px) rotate(-3deg); } to { transform: translateY(10px) rotate(3deg); } }
@keyframes wiggleL { from { transform: scaleX(-1) translateY(-8px) rotate(-3deg); } to { transform: scaleX(-1) translateY(10px) rotate(3deg); } }

/* Confetti sits above the ocean but behind every bit of text and every button. */
.confetti-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.confetti-canvas.in-reveal { position: absolute; z-index: 1; }
.reveal-stage { position: relative; z-index: 2; }
.depth-meter { z-index: 2; }
.reveal-title, .reveal-kicker, .reveal-line { text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 24px rgba(0,0,0,.55); }

/* ================= Hero polish ================= */
h1 { text-shadow: 0 2px 0 #0b2a6b, 0 4px 0 #0a2560, 0 6px 0 #081e50, 0 10px 24px rgba(0,0,0,.45); }
h1 .hl { background: linear-gradient(90deg, #d4ff3a, #7dff8a, #5ff2ff, #d4ff3a); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s linear infinite; text-shadow: none; filter: drop-shadow(0 6px 0 rgba(8,30,80,.9)); }
@keyframes shimmer { to { background-position: 300% 0; } }
.form { backdrop-filter: blur(10px); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
#go { box-shadow: 0 6px 0 #8fb21f, 0 12px 24px rgba(0,0,0,.3); transition: transform .12s, box-shadow .12s; }
#go:active { transform: translateY(4px); box-shadow: 0 2px 0 #8fb21f; }
.btn-lime { box-shadow: 0 5px 0 #8fb21f; transition: transform .12s, box-shadow .12s; }
.btn-lime:active { transform: translateY(3px); box-shadow: 0 2px 0 #8fb21f; }

/* ================= Result polish ================= */
.tilt { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .2s ease-out; position: relative; }
.card-wrap { position: relative; border-radius: 20px; }
.card-wrap::after { content: ""; position: absolute; inset: 0; border-radius: 20px; pointer-events: none;
  background: radial-gradient(500px circle at var(--gx, 50%) var(--gy, 0%), rgba(255,255,255,.22), transparent 45%); mix-blend-mode: soft-light; }
.tier-head { display: flex; align-items: center; gap: 12px; }
.tier-creature { width: 84px; cursor: pointer; filter: drop-shadow(0 10px 16px rgba(0,0,0,.35)); animation: wiggle 2.2s ease-in-out infinite alternate; }
.tier-creature:hover { transform: scale(1.08); }
.badge { animation: pop .5s cubic-bezier(.2,1.6,.4,1) both; animation-delay: calc(var(--i, 0) * 90ms + .2s); }
@keyframes pop { from { transform: scale(0) rotate(-8deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
.board-list li { transition: transform .15s, background .15s; border-radius: 10px; }
.board-list li:hover { transform: translateX(4px); background: #ffffff0d; }
.board-list li:nth-child(1) .rk { color: #ffd84a; } .board-list li:nth-child(2) .rk { color: #dfe7ff; } .board-list li:nth-child(3) .rk { color: #ffb47a; }
.paper { animation: rise .7s ease-out both; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ================= Tier reveal ================= */
body.revealing { overflow: hidden; }
.reveal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; color: #fff; transition: opacity .45s; }
.reveal.out { opacity: 0; }
.depth-meter { position: absolute; left: clamp(16px, 5vw, 60px); top: 50%; transform: translateY(-50%); display: grid; justify-items: center; gap: 10px; }
.depth-label { font: 700 12px Poppins, sans-serif; letter-spacing: 4px; opacity: .8; }
.gauge { width: 14px; height: 46vh; border-radius: 99px; background: #ffffff22; overflow: hidden; display: flex; align-items: flex-start; }
.gauge i { display: block; width: 100%; height: 0; background: linear-gradient(180deg, #5ff2ff, #d4ff3a); border-radius: 99px; }
.depth-num { font: 900 22px "Archivo Black", sans-serif; min-width: 120px; text-align: center; }
.reveal-stage { text-align: center; padding: 20px; opacity: 0; transform: scale(.6); transition: opacity .35s, transform .6s cubic-bezier(.2,1.6,.4,1); }
.reveal.show .reveal-stage { opacity: 1; transform: none; }
.reveal-creature { width: min(320px, 64vw); filter: drop-shadow(0 26px 40px rgba(0,0,0,.45)); cursor: pointer; animation: wiggle 2.2s ease-in-out infinite alternate; }
.reveal-kicker { font: 500 22px Poppins, sans-serif; margin: 6px 0 0; opacity: .85; }
.reveal-title { font: 900 clamp(48px, 10vw, 110px)/1 "Archivo Black", sans-serif; margin: 4px 0 8px; text-transform: uppercase;
  text-shadow: 0 4px 0 rgba(0,0,0,.25), 0 10px 30px rgba(0,0,0,.35); }
.reveal-line { font-size: 20px; margin: 0; opacity: .9; }
.reveal-level { display: inline-block; margin: 14px 0 22px; padding: 6px 16px; border-radius: 99px; background: rgba(0,0,0,.25); font: 700 14px Poppins, sans-serif; letter-spacing: 2px; }
.reveal-go { font-size: 17px; padding: 16px 28px; }
@media (max-width: 600px) { .depth-meter { left: 10px; } .gauge { height: 30vh; } .depth-num { font-size: 15px; min-width: 70px; } }

@media (prefers-reduced-motion: reduce) {
  .floater, .coin3d, .nft3d, .swimmer, .swimmer img, .rays span, h1 .hl, .tier-creature, .reveal-creature, .badge, .paper { animation: none !important; }
  .swimmer { display: none; }
}
@media print { .ocean, .confetti-canvas, .reveal { display: none !important; } }
.ocean { transition: background 1.2s ease; }
.rush { position: absolute; inset: 0; overflow: hidden; pointer-events: none; transition: opacity .6s; }
.reveal.show .rush { opacity: .35; }
.rush i { position: absolute; bottom: -30px; width: var(--sz); height: var(--sz); border-radius: 50%; border: 2px solid rgba(255,255,255,.55);
  animation: rushUp var(--d) linear var(--dl) infinite; }
@keyframes rushUp { to { transform: translateY(-115vh); } }
.passer { position: absolute; bottom: -180px; width: 130px; opacity: .55; filter: blur(1px) drop-shadow(0 8px 14px rgba(0,0,0,.3)); animation: passUp 1.4s ease-in both; }
@keyframes passUp { from { transform: translateY(0) scale(.9); } to { transform: translateY(-120vh) scale(1.1); } }
.reveal.show .passer { display: none; }
@media (prefers-reduced-motion: reduce) { .rush { display: none; } }

/* Real coin icons on the 3D coins */
.coin3d .face img { width: 78%; height: 78%; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px rgba(255,255,255,.55); }
.coin3d.has-logo .face { font-size: 0; background: radial-gradient(circle at 32% 28%, #fff 0%, #e8edf7 40%, #9aa6c2 100%); }
.coin3d.has-logo .rim { background: #8390ad; }

/* NFT gallery */
.nft-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 16px; }
.nft-card { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  transition: transform .2s, box-shadow .2s; animation: pop .45s cubic-bezier(.2,1.4,.4,1) both; animation-delay: calc(var(--i, 0) * 60ms); }
.nft-card:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 14px 30px rgba(11,16,32,.18); }
.nft-img { aspect-ratio: 1; background: #eeeae0; display: grid; place-items: center; overflow: hidden; }
.nft-img img, .nft-img canvas { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; display: block; }
.nft-img canvas { image-rendering: pixelated; }
.nft-meta { padding: 10px 12px 12px; display: grid; gap: 2px; min-width: 0; }
.nft-meta b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nft-meta small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nft-floor { font: 600 11.5px var(--mono); color: #4b3fa8; margin-top: 2px; }
@media (max-width: 520px) { .nft-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media print { .nft-gallery { display: none; } }

/* ================= Calmer motion ================= */
.floater { transition: opacity .7s ease; }
.floater.swap { opacity: 0 !important; }
.ocean::after { content: ""; position: absolute; inset: 0; background: #02040f; opacity: 0; transition: opacity 1s ease; pointer-events: none; }
.ocean .layer, .ocean .swimmer, .rays { transition: opacity 1s ease, filter 1s ease; }
/* Reading the statement: everything behind it slows, dims and stops crossing the page. */
body.reading .ocean::after { opacity: .45; }
body.reading .ocean .swimmer { opacity: 0; }
body.reading .ocean .layer { filter: blur(2px); }
body.reading .floater, body.reading .coin3d, body.reading .nft3d, body.reading .swimmer, body.reading .rays span { animation-play-state: paused; }
/* Calm mode: nothing moves. */
body.calm .floater, body.calm .coin3d, body.calm .nft3d, body.calm .swimmer, body.calm .swimmer img, body.calm .rays span,
body.calm h1 .hl, body.calm .tier-creature, body.calm .reveal-creature, body.calm .rush i { animation-play-state: paused !important; }
body.calm .ocean .swimmer, body.calm .rush { display: none; }
body.calm .tilt { transform: none !important; }
.calm-toggle { position: fixed; right: 16px; bottom: 16px; z-index: 40; font: 600 13px Poppins, sans-serif; padding: 9px 14px; border-radius: 99px;
  background: rgba(8,20,60,.75); color: #fff; border: 1px solid #ffffff33; backdrop-filter: blur(8px); cursor: pointer; }
.calm-toggle:hover { background: rgba(8,20,60,.95); }
@media print { .calm-toggle { display: none; } }

/* Leaderboard teasers: a top-3 strip on the home screen, and "you'd be #N" beside the tier */
.top-fish { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; max-width: 640px; margin: 18px auto 0; padding: 12px 16px; border-radius: 16px; background: #ffffff12; border: 1px solid #ffffff28; color: inherit; text-decoration: none; font-size: 14px; }
.top-fish:hover { background: #ffffff1c; }
.top-fish[hidden] { display: none; }
.tf-label { font-weight: 700; }
.tf-rows { display: flex; flex-wrap: wrap; gap: 6px 12px; flex: 1; min-width: 0; }
.tf-rows span { white-space: nowrap; opacity: .9; }
.tf-rows b { color: var(--lime); font-family: "Archivo Black", sans-serif; font-weight: 400; margin-right: 4px; }
.tf-cta { color: var(--lime); font-weight: 600; white-space: nowrap; }
.rank-tease { margin: 0 0 10px; font-size: 18px; font-weight: 600; }
.rank-tease b { color: var(--lime); font-family: "Archivo Black", sans-serif; font-weight: 400; font-size: 22px; }
.see-board { display: inline-block; margin-top: 6px; font-size: 14px; color: var(--lime); }
@media print { .top-fish, .see-board, .rank-tease { display: none !important; } }

/* Wallet ownership check (self-send) */
.verify { margin-top: 14px; background: #160f3ced; backdrop-filter: blur(8px); border: 1px solid #ffffff25; border-radius: 16px; padding: 14px; }
.verify .small { font-size: 13px; }
.v-who { font-weight: 600; margin: 8px 0; word-break: break-all; }
.v-chain { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.v-chain select { font: inherit; border-radius: 8px; padding: 6px 8px; border: 0; color: var(--ink); }
.v-steps { margin: 10px 0 12px; padding-left: 20px; font-size: 14px; line-height: 1.7; }
.v-steps code { font-family: var(--mono); background: #00000030; padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.mini { padding: 3px 10px; font-size: 12px; border-radius: 999px; background: #ffffff22; color: inherit; margin-left: 4px; }
@media print { .verify { display: none !important; } }

.v-label { font-weight: 600; font-size: 14px; margin: 14px 0 8px; }
.v-label code { font-family: var(--mono); background: #00000030; padding: 2px 6px; border-radius: 6px; }
.v-chains { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.v-chain-opt { text-align: left; display: block; padding: 10px 12px; border-radius: 12px; background: #ffffff10; border: 1px solid #ffffff25; color: inherit; font: 500 14px Poppins, sans-serif; cursor: pointer; }
.v-chain-opt small { display: block; font-weight: 400; font-size: 12px; opacity: .75; margin-top: 2px; }
.v-chain-opt .gas { color: var(--lime); font-weight: 600; opacity: 1; }
.v-chain-opt[aria-checked="true"] { border-color: var(--lime); background: #c6ff3a1f; }
.v-send { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.v-qr { width: 156px; height: 156px; border-radius: 12px; overflow: hidden; background: #fff; flex: none; }
.v-qr svg { width: 100%; height: 100%; display: block; }
.v-send-side { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.v-manual { margin-top: 10px; font-size: 14px; }
.v-manual summary { cursor: pointer; opacity: .85; }

.v-chain-opt[hidden] { display: none; }

/* Remembered wallets */
.welcome { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; max-width: 760px; margin: 0 auto 16px; padding: 14px 18px; border-radius: 18px; background: #141a4aee; backdrop-filter: blur(8px); border: 1px solid #d4ff3a66; text-align: left; }
.welcome[hidden] { display: none; }
.welcome-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.welcome-text b { font-size: 18px; word-break: break-all; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.linkish { background: none; border: 0; color: inherit; opacity: .7; text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; }
.me-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.me-qr { width: 120px; height: 120px; border-radius: 10px; overflow: hidden; background: #fff; flex: none; }
.me-qr svg { width: 100%; height: 100%; display: block; }
.me-side { flex: 1; min-width: 200px; }
.small { font-size: 13px; }
@media print { .welcome, #me-box { display: none !important; } }

.name-box { margin-top: 14px; background: #160f3ced; backdrop-filter: blur(8px); border: 1px solid #ffffff25; border-radius: 16px; padding: 14px; }
.name-box[hidden] { display: none; }
.name-box input { flex: 1; min-width: 0; font: 500 15px Poppins, sans-serif; border: 0; border-radius: 10px; padding: 10px; background: #fff; color: var(--ink); }

.name-label { display: block; font-size: 14px; font-weight: 600; margin: 10px 0 6px; }
.name-label input { display: block; width: 100%; margin-top: 6px; }
.avatars { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.avatars button { width: 64px; height: 56px; padding: 4px; border-radius: 12px; background: #ffffff10; border: 1px solid #ffffff30; cursor: pointer; }
.avatars button img { width: 100%; height: 100%; object-fit: contain; }
.avatars button[aria-checked="true"] { border-color: var(--lime); background: #d4ff3a22; }
.avatars button:disabled { opacity: .25; cursor: not-allowed; }
#page-row { margin-top: 10px; }
#page-row[hidden] { display: none; }

.nm a { color: inherit; text-decoration: underline; text-decoration-color: #d4ff3a88; text-underline-offset: 3px; }

/* Profile: compact summary, editor, add-wallet, and a modal for "My profile" */
.name-box { position: relative; }
.pf-close { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: inherit; font-size: 26px; line-height: 1; opacity: .7; cursor: pointer; }
.pf-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 8px; }
.pf-summary[hidden], .pf-edit[hidden], .pf-add[hidden] { display: none; }
.pf-av { width: 70px; height: 60px; object-fit: contain; }
.pf-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pf-who b { font-size: 20px; word-break: break-word; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; margin-top: 6px; }
.modal { position: fixed; inset: 0; z-index: 50; background: #02061acc; display: grid; place-items: center; padding: 16px; overflow: auto; }
.modal[hidden] { display: none; }
.modal-card { width: min(560px, 100%); }
.modal-card .name-box { margin: 0; }

/* Tabs for multi-wallet statements: combined, or one wallet at a time */
.wtabs { display: flex; flex-wrap: wrap; gap: 8px; max-width: 1100px; margin: 0 auto 18px; padding: 0 16px; }
.wtabs[hidden] { display: none; }
.wtabs button { font: 600 14px Poppins, sans-serif; padding: 10px 16px; border-radius: 999px; border: 1px solid #ffffff30; background: #160f3ced; color: #fff; cursor: pointer; }
.wtabs button[aria-pressed="true"] { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.wtabs button:disabled { opacity: .6; cursor: progress; }
@media print { .wtabs { display: none !important; } }

/* Pasted wallet lists: numbered boxes with a type tag */
.wallet-row { position: relative; align-items: center; }
.wnum { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--ink); font: 700 14px Poppins, sans-serif; }
.wnum[hidden] { display: none; }
.wtag { position: absolute; right: 64px; top: 50%; transform: translateY(-50%); font: 700 11px Poppins, sans-serif; letter-spacing: .5px; padding: 4px 8px; border-radius: 999px; background: #0b1020; color: #fff; pointer-events: none; }
.wallet-row:first-child .wtag { right: 12px; }
.wallet-row:first-child:has(.rm) .wtag { right: 64px; }
.wtag.bad { background: #ff4d5e; }
.wtag[hidden] { display: none; }
.wallet-row input.wallet { padding-right: 96px; }
.wallet-count { grid-column: 1 / -1; margin: 2px 0 0; font-size: 13px; color: var(--lime); }
.wallet-count[hidden] { display: none; }
.add-wallet[hidden] { display: none; }
