/* Fugazi — minimal editorial theme, mint-teal accent on warm dark */
:root {
  --background: #14150f;
  --panel: #191a13;
  --surface: #1f2018;
  --border: #2e2f24;
  --border-soft: #24251b;
  --foreground: #f2f3ec;
  --muted: #86887a;
  --accent: #2ef0d4;
  --accent-deep: #17b9a3;
  --accent-text: #04302b;
  --accent-edge: #8bf7e8;
  --gold: #e8b04c;
  --ok: #4ade80;
  --danger: #e5484d;
  --t-legendary: #f0a13d;
  --t-epic: #a583f7;
  --t-rare: #58a6ff;
  --t-uncommon: #45d483;
  --t-common: #c9c9d1;
  --radius: 10px;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --dot: #22231a;
}
[data-theme="light"] {
  --background: #f6f2f3;
  --panel: #faf7f8;
  --surface: #ffffff;
  --border: #e2dcde;
  --border-soft: #ece6e8;
  --foreground: #131114;
  --muted: #9a9295;
  --dot: #eae4e6;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background-color: var(--background);
  background-image:
    radial-gradient(var(--dot) 1.1px, transparent 1.1px),
    radial-gradient(var(--dot) 1.1px, transparent 1.1px);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* app pages scroll: the hero fills the first viewport, the pool grid flows below */
body.app { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font-family: inherit; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.small { font-size: 13px; }

/* ---------- header ---------- */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; flex-shrink: 0;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 30px; height: 30px; flex-shrink: 0; object-fit: contain; display: block; }
/* clean editorial wordmark */
.logo-word {
  font-family: var(--font-sans); font-weight: 800; font-size: 19px;
  line-height: 1; letter-spacing: 3.5px; text-transform: uppercase; color: var(--foreground);
}
.logo-word .tld { color: var(--accent); letter-spacing: 1px; }
/* real Solana mark (official three-parallelogram logo) as the SOL currency glyph */
.solmark { height: 1em; width: auto; vertical-align: -0.12em; }
.solc {
  display: inline-block; width: 0.82em; height: 0.64em; vertical-align: 0; margin-right: 2px;
  background: no-repeat center / contain;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 398 312'%3E%3Cdefs%3E%3ClinearGradient id='s' x1='360' y1='351' x2='141' y2='-69' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%239945FF'/%3E%3Cstop offset='.5' stop-color='%235497D5'/%3E%3Cstop offset='1' stop-color='%2314F195'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='url(%23s)'%3E%3Cpath d='M64.6 237.9c2.4-2.4 5.7-3.8 9.2-3.8h317.4c5.8 0 8.7 7 4.6 11.1l-62.7 62.7c-2.4 2.4-5.7 3.8-9.2 3.8H15.5c-5.8 0-8.7-7-4.6-11.1z'/%3E%3Cpath d='M64.6 3.8C67.1 1.4 70.4 0 73.8 0h317.4c5.8 0 8.7 7 4.6 11.1l-62.7 62.7c-2.4 2.4-5.7 3.8-9.2 3.8H15.5c-5.8 0-8.7-7-4.6-11.1z'/%3E%3Cpath d='M333.1 120.1c-2.4-2.4-5.7-3.8-9.2-3.8H6.5c-5.8 0-8.7 7-4.6 11.1l62.7 62.7c2.4 2.4 5.7 3.8 9.2 3.8h317.4c5.8 0 8.7-7 4.6-11.1z'/%3E%3C/g%3E%3C/svg%3E");
}
.header-right { display: flex; align-items: center; gap: 12px; }
.btn {
  background: var(--accent); color: var(--accent-text);
  border: 1px solid var(--accent-edge); border-radius: 9px;
  padding: 9px 18px; font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 0 0 20px rgba(46, 240, 212, 0.35);
  transition: filter 0.12s;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn.ghost {
  background: transparent; color: var(--foreground); border-color: var(--border);
  box-shadow: none; font-weight: 600;
}
.btn.ghost:hover { border-color: var(--muted); filter: none; }
.btn.accent { background: var(--accent); border-color: var(--accent-edge); color: var(--accent-text); }
.icon-btn {
  background: none; border: none; color: var(--muted);
  width: 34px; height: 34px; cursor: pointer; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { color: var(--foreground); background: var(--surface); }
.wallet-pill { font-family: var(--font-mono); font-size: 12.5px; }

/* ---------- app shell (home) ---------- */
.app-body { height: calc(100vh - 58px); display: flex; min-height: 420px; }
.stage-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px; height: 46px; flex-shrink: 0;
  border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--background) 78%, transparent);
}
.toolbar .tb-left { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.tb-label { font-family: var(--font-mono); font-size: 12px; color: var(--foreground); margin-right: 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 8px; padding: 3px 9px;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  cursor: pointer; background: transparent; transition: all 0.12s;
}
.chip:hover { color: var(--foreground); }
.chip.active { background: var(--surface); color: var(--foreground); border-color: #38383e; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.chip .pct { opacity: 0.65; }
.toolbar .tb-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tb-link { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tb-link:hover { color: var(--foreground); }

/* ---------- card fan ---------- */
/* z-index:0 isolates the fan's stacking so cards can never sit above modals */
.stage { flex: 1; position: relative; overflow: hidden; min-height: 0; z-index: 0; }
.fan { position: absolute; inset: 0; }
.fcard {
  position: absolute; left: 50%; top: 50%; width: 236px;
  margin-left: -118px; margin-top: -168px;
  border-radius: 14px; background: var(--surface);
  border: 1px solid #28282d; overflow: visible; cursor: pointer;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s, filter 0.35s, box-shadow 0.35s;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.fcard .fc-inner { border-radius: 13px; overflow: hidden; }
.fcard img.fc-img, .fcard .fc-img {
  display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  background: #1b1b1e;
}
.fcard.center {
  border-color: rgba(46, 240, 212, 0.8);
  box-shadow: 0 0 0 1px rgba(46, 240, 212, 0.35), 0 0 46px rgba(46, 240, 212, 0.24), 0 26px 70px rgba(0, 0, 0, 0.6);
}
.fcard.dim { filter: brightness(0.55) saturate(0.8); }
.fc-crown {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 28px; border-radius: 50%; background: #17171a;
  border: 1.5px solid var(--gold); color: var(--gold); font-size: 13px;
  display: flex; align-items: center; justify-content: center; z-index: 6;
}
.fc-info { padding: 8px 10px 9px; background: var(--surface); }
.fc-l1 { display: flex; align-items: baseline; gap: 6px; }
.fc-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-rank { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent); flex-shrink: 0; }
.fc-tier { margin-left: auto; font-family: var(--font-mono); font-size: 10px; flex-shrink: 0; }
.fc-l2 { display: flex; justify-content: space-between; margin-top: 3px; font-family: var(--font-mono); font-size: 10px; color: var(--muted); gap: 8px; }
.fc-odds { flex-shrink: 0; }
.stage-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px;
  align-items: center; justify-content: center; color: var(--muted); font-family: var(--font-mono); font-size: 13px;
}

/* ---------- sidebar ---------- */
.sidebar {
  width: 400px; flex-shrink: 0; display: flex; flex-direction: column; min-height: 0;
  border-left: 1px solid var(--border-soft);
  border-top: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
}
body.side-collapsed .sidebar { display: none; }
.side-tabs { display: flex; gap: 4px; padding: 7px 10px; border-bottom: 1px solid var(--border-soft); flex-shrink: 0; }
.stab {
  flex: 1; text-align: center; font-family: var(--font-mono); font-size: 11.5px;
  color: var(--muted); padding: 7px 0; border-radius: 8px; cursor: pointer;
  background: none; border: none;
}
.stab.active { background: var(--surface); color: var(--foreground); }
.sort-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  border-bottom: 1px solid var(--border-soft); flex-shrink: 0;
}
.sort-opts { display: flex; gap: 2px; }
.sopt { cursor: pointer; padding: 2px 9px; border-radius: 6px; }
.sopt:hover { color: var(--foreground); }
.sopt.active { background: var(--surface); color: var(--foreground); }
.mine-strip {
  padding: 8px 16px; border-bottom: 1px solid var(--border-soft);
  font-family: var(--font-mono); font-size: 11px; color: var(--muted); flex-shrink: 0;
}
.mine-strip a { color: var(--accent); }
.feed { flex: 1; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.frow {
  display: flex; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft); align-items: flex-start;
}
.frow:hover { background: color-mix(in srgb, var(--surface) 55%, transparent); }
.frow .f-thumb {
  width: 44px; height: 44px; border-radius: 8px; object-fit: cover;
  background: #1a1a1d; flex-shrink: 0;
}
.f-mid { flex: 1; min-width: 0; }
.f-ago { font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); }
.f-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-col { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-right { text-align: right; flex-shrink: 0; }
.f-val { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; }
.f-acq { font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-top: 1px; }
.f-act { margin-top: 3px; }
.schip {
  display: inline-block; font-family: var(--font-mono); font-size: 9.5px;
  padding: 2.5px 8px; border-radius: 5px; margin-top: 3px;
}
.s-pending { background: #232327; color: #a1a1aa; }
.s-bid { background: rgba(74, 222, 128, 0.13); color: var(--ok); }
.s-fwa { background: rgba(46, 240, 212, 0.15); color: var(--accent); }
.s-relist { background: transparent; border: 1px solid #3a3a40; color: #8d8d96; }
.s-claim { background: rgba(88, 166, 255, 0.13); color: var(--t-rare); }
.s-withdrawn { background: #232327; color: #77777f; }
.feed-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.feed-btn-row { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); }

/* ---------- buy box ---------- */
.buy-box { border-top: 1px solid var(--border); padding: 12px 16px 12px; flex-shrink: 0; }
.qty-row {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-bottom: 8px;
}
.qty-row .qv { color: var(--foreground); display: flex; align-items: center; gap: 8px; }
.gear {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 14px; padding: 2px; border-radius: 6px;
}
.gear:hover { color: var(--foreground); }
.qslider { position: relative; height: 24px; margin-bottom: 12px; }
.qslider .track { position: absolute; top: 10px; left: 3px; right: 3px; height: 4px; background: #232327; border-radius: 2px; }
.qslider .dots { position: absolute; top: 8px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 1px; pointer-events: none; }
.qslider .qdot { width: 8px; height: 8px; border-radius: 50%; background: #2c2c31; }
.qslider input {
  -webkit-appearance: none; appearance: none; position: absolute; inset: 0;
  width: 100%; background: transparent; margin: 0; cursor: pointer;
}
.qslider input::-webkit-slider-runnable-track { height: 24px; background: transparent; }
.qslider input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--accent-deep); margin-top: 4.5px;
  box-shadow: 0 0 10px rgba(46, 240, 212, 0.5);
}
.qslider input::-moz-range-track { height: 24px; background: transparent; }
.qslider input::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--accent-deep);
}
.cta {
  width: 100%; padding: 13px; border-radius: 10px;
  background: var(--accent); color: var(--accent-text);
  border: 1px solid var(--accent-edge); font-size: 14px; font-weight: 800;
  cursor: pointer; box-shadow: 0 0 26px rgba(46, 240, 212, 0.28);
  transition: filter 0.12s;
}
.cta:hover { filter: brightness(1.06); }
.cta:disabled { opacity: 0.45; box-shadow: none; cursor: not-allowed; }
.buy-note {
  text-align: center; font-family: var(--font-mono); font-size: 10.5px;
  color: var(--muted); margin-top: 9px;
}
.buy-note a { color: var(--foreground); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }

/* ---------- settings popover ---------- */
.pop {
  position: absolute; right: 14px; bottom: 118px; z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; width: 220px; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted);
}
.pop .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pop select {
  background: var(--panel); color: var(--foreground); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 6px; font-family: var(--font-mono); font-size: 11.5px;
}

/* ---------- generic layout (docs / activity / tos) ---------- */
main { flex: 1; width: 100%; max-width: 1060px; margin: 0 auto; padding: 32px 24px 64px; }
.card {
  border: 1px solid var(--border); border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  padding: 20px; margin-bottom: 24px;
}
.card h2 { margin: 0 0 4px; font-size: 16px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; color: var(--muted); font-weight: 500;
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 8px 10px; border-bottom: 1px solid var(--border);
}
td { padding: 10px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.nft-cell { display: flex; align-items: center; gap: 10px; }
.nft-thumb {
  width: 34px; height: 34px; border-radius: 6px; background: #1a1a1d;
  object-fit: cover; flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; font-size: 10px; color: var(--muted); overflow: hidden;
}
.tag {
  display: inline-block; border: 1px solid var(--border); border-radius: 999px;
  padding: 1px 9px; font-size: 11.5px; font-family: var(--font-mono); color: var(--muted);
}
.tag.crown { color: var(--gold); border-color: rgba(232, 176, 76, 0.4); }
.tabs { display: inline-flex; gap: 4px; }
.tabs button {
  background: none; border: none; color: var(--muted); font-size: 13px;
  font-family: var(--font-mono); padding: 4px 10px; cursor: pointer; border-radius: 8px;
}
.tabs button.active { color: var(--foreground); background: var(--surface); }
.sort-select {
  background: var(--surface); color: var(--foreground); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 8px; font-size: 12px; font-family: var(--font-mono);
}

/* ---------- modal ---------- */
.overlay {
  position: fixed; inset: 0; background: rgb(0 0 0 / 0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 500; padding: 16px;
}
.modal {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  width: 430px; max-width: 100%; max-height: 86vh; overflow-y: auto; padding: 20px;
}
.modal h3 { margin: 0 0 12px; font-size: 16px; }
.nft-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.nft-pick {
  border: 1px solid var(--border); border-radius: 10px; padding: 7px;
  cursor: pointer; text-align: center; font-size: 11.5px; overflow: hidden;
}
.nft-pick img, .nft-pick .ph {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 7px;
  background: #1b1b1e; display: block; margin-bottom: 6px;
}
.nft-pick.selected { border-color: var(--accent); box-shadow: 0 0 12px rgba(46, 240, 212, 0.25); }
.field { margin: 12px 0; }
.field label { display: block; font-size: 12px; font-family: var(--font-mono); color: var(--muted); margin-bottom: 5px; }
.field input {
  width: 100%; background: var(--background); border: 1px solid var(--border);
  color: var(--foreground); border-radius: 8px; padding: 9px 11px;
  font-size: 14px; font-family: var(--font-mono);
}
.field input:focus { outline: none; border-color: var(--accent); }

/* ---------- draw reveal ---------- */
.reveal { text-align: center; padding: 14px 0; }
.reveal .spin {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 14px;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: rot 0.8s linear infinite;
}
@keyframes rot { to { transform: rotate(360deg); } }
.reveal img { width: 132px; height: 132px; border-radius: 14px; object-fit: cover; background: #1b1b1e; }
.reveal .won { font-size: 18px; font-weight: 800; margin: 10px 0 2px; }
.choice-grid { display: grid; gap: 8px; margin-top: 16px; }
.choice {
  text-align: left; background: none; border: 1px solid var(--border);
  border-radius: 10px; color: var(--foreground); padding: 12px; cursor: pointer;
}
.choice:hover { border-color: var(--accent); }
.choice b { display: block; font-size: 13.5px; }
.choice span { font-size: 12px; color: var(--muted); }
.batch-item { border: 1px solid var(--border-soft); border-radius: 12px; padding: 12px; margin-bottom: 10px; }

/* ---------- docs ---------- */
.docs-wrap { display: flex; gap: 40px; align-items: flex-start; }
.docs-nav { width: 210px; flex-shrink: 0; position: sticky; top: 24px; font-size: 13.5px; }
.docs-nav .sec { color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; margin: 18px 0 6px; }
.docs-nav a { display: block; padding: 4px 10px; border-radius: 7px; color: var(--muted); }
.docs-nav a:hover { color: var(--foreground); }
.docs-nav a.active { color: var(--foreground); background: var(--surface); }
article { min-width: 0; max-width: 680px; }
article h1 { font-family: var(--font-serif); font-weight: 500; font-size: 34px; letter-spacing: 0; margin: 0 0 8px; }
article h2 { font-size: 18px; margin: 28px 0 8px; }
article h3 { font-size: 15px; margin: 20px 0 6px; }
article p, article li { color: color-mix(in srgb, var(--foreground) 82%, var(--muted)); font-size: 14.5px; }
article code {
  font-family: var(--font-mono); font-size: 12.5px; background: var(--surface);
  border-radius: 4px; padding: 1.5px 5px;
}
article pre {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; overflow-x: auto;
}
article pre code { background: none; padding: 0; }
article table { font-size: 13.5px; margin: 10px 0; }
article .callout {
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 10px 14px; margin: 14px 0; font-size: 14px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
article .callout.warn { border-left-color: var(--danger); }
.addr { font-family: var(--font-mono); font-size: 12.5px; word-break: break-all; }

/* ---------- below the fold: stats + full pool grid ---------- */
.below { max-width: 1120px; margin: 0 auto; padding: 40px 24px 72px; width: 100%; }
.stat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.stat-card {
  border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}
.stat-card .sc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.stat-card .sc-title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.stat-card .sc-val { font-family: var(--font-mono); font-size: 14px; color: var(--accent); }
.stat-card p { margin: 0; font-size: 13px; color: var(--muted); }
.reward-bar { height: 8px; border-radius: 6px; margin: 6px 0 10px; background: linear-gradient(90deg, var(--t-rare), var(--accent), var(--gold)); position: relative; }
.reward-bar .marker { position: absolute; top: -3px; width: 3px; height: 14px; border-radius: 2px; background: var(--foreground); box-shadow: 0 0 6px rgba(0,0,0,0.6); }
.stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 34px;
  border: 1px solid var(--border); border-radius: 14px; padding: 4px 0;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.stat-cell { padding: 14px 20px; }
.stat-cell + .stat-cell { border-left: 1px solid var(--border-soft); }
.stat-cell .k { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-cell .v { font-family: var(--font-mono); font-size: 19px; font-weight: 700; margin-top: 4px; }
.grid-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.grid-head h2 { font-family: var(--font-serif); font-weight: 500; font-size: 26px; margin: 0; }
.grid-head .gh-sub { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.grid-head .gh-sub b { color: var(--foreground); }
.grid-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 18px; flex-wrap: wrap; }
.grid-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.gridtoggle { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.gridtoggle button { background: none; border: none; color: var(--muted); font-family: var(--font-mono); font-size: 12px; padding: 5px 12px; cursor: pointer; }
.gridtoggle button.active { background: var(--surface); color: var(--foreground); }
.nft-grid-full { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gcard {
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  background: var(--surface); transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s; cursor: pointer;
}
.gcard:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 12px 30px rgba(0,0,0,0.45); }
.gcard.crown { border-color: rgba(232, 176, 76, 0.6); }
.gcard .g-img { position: relative; }
.gcard .g-ext {
  position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 6px;
  background: rgba(0,0,0,0.55); color: var(--accent); font-size: 12px; display: flex;
  align-items: center; justify-content: center; opacity: 0; transition: opacity 0.12s;
}
.gcard:hover .g-ext { opacity: 1; }
.fcard.center { cursor: pointer; }
.gcard .g-img img, .gcard .g-img .ph { display: block; width: 100%; aspect-ratio: 1/1; object-fit: cover; background: #1b1b1e; }
.gcard .g-crown { position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,0.6); border: 1px solid var(--gold); color: var(--gold); font-size: 11px; display: flex; align-items: center; justify-content: center; }
.g-info { padding: 9px 11px 11px; }
.g-l1 { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.g-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-tier { font-family: var(--font-mono); font-size: 10px; flex-shrink: 0; }
.g-l2 { display: flex; justify-content: space-between; margin-top: 4px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.g-list .nft-grid-full { grid-template-columns: 1fr; }
.g-list .gcard { display: flex; align-items: center; }
.g-list .gcard .g-img { width: 56px; flex-shrink: 0; }
.g-list .g-info { flex: 1; display: flex; align-items: center; justify-content: space-between; }
.g-list .g-l2 { margin-top: 0; gap: 20px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 28px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.pager button {
  background: var(--surface); border: 1px solid var(--border); color: var(--foreground);
  border-radius: 8px; padding: 6px 16px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.pager button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- $FUGAZI holder raffle ---------- */
.raffle { border-top: 1px solid var(--border-soft); background:
  radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%); }
.raffle-inner { max-width: 1120px; margin: 0 auto; padding: 34px 24px 30px; }
.raffle-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.raffle-title { font-family: var(--font-serif); font-weight: 500; font-size: 30px; margin: 0 0 8px; letter-spacing: 0.2px; }
.raffle-sub { margin: 0; font-size: 14px; color: var(--muted); max-width: 620px; }
.raffle-sub b { color: var(--accent); font-weight: 700; }
.raffle-clock { text-align: center; flex-shrink: 0; }
.rc-label { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.rc-time {
  font-family: var(--font-mono); font-weight: 700; font-size: 42px; line-height: 1.05; color: var(--accent);
  text-shadow: 0 0 24px rgba(46, 240, 212, 0.35); font-variant-numeric: tabular-nums;
}
.raffle-meta { display: flex; gap: 18px; flex-wrap: wrap; margin: 16px 0 14px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.raffle-meta .rm b { color: var(--foreground); }
.raffle-meta .rm.on { color: var(--accent); }
/* winners strip — wallets that received airdrops, one horizontal row */
.raffle-winners {
  display: flex; gap: 10px; flex-wrap: nowrap; margin: 0 0 14px;
  overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px;
}
.rwin { flex-shrink: 0; }
.rwin .rw-wallet { color: var(--accent); }
.rwin .rw-wallet:hover { text-decoration: underline; text-underline-offset: 2px; }
.rwin .rw-tx {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; margin-left: 2px;
}
.rwin .rw-tx:hover { color: var(--accent); border-color: var(--accent); }
.rwin {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 12px; padding: 7px 12px 7px 7px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  transition: border-color 0.12s, transform 0.12s;
}
.rwin:hover { border-color: var(--accent); transform: translateY(-2px); color: inherit; }
.rwin img, .rwin .rw-ph {
  width: 34px; height: 34px; border-radius: 8px; object-fit: cover; background: #1b1b1e;
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.rwin .rw-mid { display: flex; flex-direction: column; line-height: 1.3; }
.rwin .rw-mid b { font-size: 12.5px; color: var(--accent); }
.rwin .rw-mid span { font-size: 11px; color: var(--muted); }
.rwin .rw-ago { font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); align-self: flex-start; }
.rwin-empty { font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); padding: 2px 0; }

.raffle-strip-wrap { overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.raffle-strip { display: flex; gap: 12px; min-height: 40px; }
.rprize {
  flex-shrink: 0; width: 168px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  background: var(--surface); transition: transform 0.12s, border-color 0.12s;
}
.rprize:hover { transform: translateY(-4px); border-color: var(--accent); }
.rprize img, .rprize .rph { display: block; width: 100%; aspect-ratio: 1/1; object-fit: cover; background: #1b1b1e; }
.rprize .rph { display: flex; align-items: center; justify-content: center; font-size: 52px; color: var(--muted); }
.rprize span { display: block; padding: 9px 11px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rprize-empty { font-size: 13px; color: var(--muted); padding: 10px 0; max-width: 640px; }
.raffle-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; font-family: var(--font-mono); }

/* spin overlay */
.spin-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(4, 5, 7, 0.95);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.spin-box { width: 720px; max-width: 100%; text-align: center; }
.spin-title { font-family: var(--font-mono); font-size: 14px; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 16px; }
.spin-reel-wrap {
  position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); height: 168px;
}
.spin-marker { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; z-index: 3; background: var(--accent); box-shadow: 0 0 16px var(--accent); }
.spin-reel { display: flex; height: 100%; align-items: center; will-change: transform; }
.stile { flex-shrink: 0; width: 132px; padding: 0 8px; text-align: center; }
.stile img, .stile .sph {
  width: 116px; height: 116px; border-radius: 10px; object-fit: cover; background: #1b1b1e; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; font-size: 34px; color: var(--muted);
}
.stile span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spin-result { margin-top: 18px; opacity: 0; transform: translateY(8px); transition: opacity 0.4s, transform 0.4s; }
.spin-result.show { opacity: 1; transform: none; }
.spin-result .win-img { width: 148px; height: 148px; border-radius: 14px; object-fit: cover; background: #1b1b1e; box-shadow: 0 0 40px rgba(46, 240, 212, 0.35); margin: 0 auto; }
.spin-result .win-name { font-size: 20px; font-weight: 800; margin: 12px 0 4px; }
.spin-result .win-holder { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.spin-result .win-holder b { color: var(--accent); }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--border-soft); padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 12.5px; font-family: var(--font-mono); color: var(--muted); flex-shrink: 0;
}
footer nav { display: flex; gap: 18px; align-items: center; }
footer .foot-left { display: flex; align-items: center; gap: 12px; }
.foot-sol { display: inline-flex; align-items: center; gap: 5px; }
.foot-brand { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.foot-brand:hover { color: var(--foreground); }
.foot-brand svg { width: 15px; height: 15px; }
.foot-brand b { font-weight: 700; letter-spacing: 0.2px; }
body.app footer { padding: 8px 16px; font-size: 11px; }
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 16px; font-size: 13.5px; z-index: 100; max-width: 90vw;
}
.toast.err { border-color: var(--danger); }

/* ---------- treasury bar + feed notification rows ---------- */
.treasury-bar {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  padding: 8px 16px; border-bottom: 1px solid var(--border-soft);
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
}
.treasury-bar .t-label { color: var(--foreground); }
.treasury-bar .t-addr { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.treasury-bar .t-stat { margin-left: auto; }
.treasury-bar .t-stat + .t-stat { margin-left: 0; }
.f-kind { color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; }
.f-thumb.f-sol { display: flex; align-items: center; justify-content: center; }
.s-prize { background: rgba(46, 240, 212, 0.15); color: var(--accent); }

/* new server event: slide in with a teal glow that fades out */
.frow.fresh { animation: rowIn 1.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes rowIn {
  0% { opacity: 0; transform: translateX(26px); background: rgba(46, 240, 212, 0.22); }
  30% { opacity: 1; transform: none; background: rgba(46, 240, 212, 0.18); }
  100% { background: transparent; }
}
.treasury-bar.pulse { animation: barPulse 1.2s ease-out; }
@keyframes barPulse {
  0% { background: rgba(46, 240, 212, 0.2); }
  100% { background: transparent; }
}

/* toolbar raffle timer */
.gacha-timer {
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.06em; display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px;
}
.gacha-timer b {
  color: var(--accent); font-size: 12.5px; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(46, 240, 212, 0.45);
}

/* centred gacha card idles with a gentle float */
.fcard.center .fc-inner { animation: cardFloat 3.4s ease-in-out infinite; }
@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ---------- deposit modal tabs ---------- */
.dep-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.dtab {
  flex: 1; background: none; border: 1px solid var(--border); border-radius: 9px;
  color: var(--muted); font-family: var(--font-mono); font-size: 12px;
  padding: 8px 0; cursor: pointer;
}
.dtab.active { background: var(--surface); color: var(--foreground); border-color: var(--accent); }

@media (max-width: 900px) {
  .sidebar { width: 330px; }
  .fcard { width: 190px; margin-left: -95px; }
  .notif-stack { width: 270px; }
}
@media (max-width: 900px) {
  .nft-grid-full { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  body.app { height: auto; overflow: visible; }
  .app-body { flex-direction: column; height: auto; }
  .sidebar { width: 100%; border-left: none; max-height: 70vh; }
  .stage { min-height: 360px; height: 60vh; }
  .docs-wrap { flex-direction: column; }
  .docs-nav { position: static; width: 100%; display: flex; flex-wrap: wrap; gap: 2px 10px; }
  .docs-nav .sec { width: 100%; }
  .nft-grid { grid-template-columns: repeat(2, 1fr); }
  .nft-grid-full { grid-template-columns: repeat(2, 1fr); }
  .stat-cards { grid-template-columns: 1fr; }
}
