/* The look shared by every page after the landing page: black and gold with one accent colour, the original
   site's highlight blue (Mac: no green, use the blues), and red ONLY for the 4 in M4, which is branding
   (Mac, 2026-10-30). Zen Dots for all text
   (one weight only, so no faux bold), the starfield behind, gold pill buttons and rounded cards. */
:root {
  --bg: #000;
  --gold: #d9a441;
  --gold-light: #f3d38a;
  --gold-dark: #a8761f;
  --brand-red: #c2281f;     /* the 4 in M4 and nothing else */
  --accent: #528aff;        /* M4 blue: the 2022 site's highlight blue */
  --accent-sky: #6ec1e4;    /* lines and focus rings: the 2022 roadmap tabs' blue */
  --accent-deep: #3962ae;   /* the 2022 menu blue */
  --accent-rgb: 82, 138, 255;
  --danger: #c9873a;         /* for destructive buttons (burn, cancel): amber, not red */
  --danger-rgb: 201, 135, 58;
  --text: #f0f0f0;          /* headings and titles */
  --body: #d7d7d7;          /* paragraphs */
  --muted: #779ab1;         /* slate: labels and quiet text */
  --panel: rgba(10, 10, 14, .74);
  --panel-solid: #0b0b0f;
  --line: rgba(217, 164, 65, .22);
  --line-strong: rgba(217, 164, 65, .55);
  --ok: #6EC1E4;
  --warn: #e7b04a;
  --bad: #e8915a;            /* errors: amber-orange, never red (red is only the 4) */
  --radius: 16px;
  --header: 64px;
  --gutter: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: "Zen Dots", system-ui, sans-serif; font-weight: 400; font-synthesis: none;
  min-height: 100vh; min-height: 100svh; overflow-x: hidden; background: var(--bg);
  font-size: 14px; line-height: 1.6; letter-spacing: .02em;
}
img { display: block; max-width: 100%; }
a { color: var(--gold-light); text-decoration: none; }
a:hover { color: #fff; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(217, 164, 65, .35); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The starfield and the slow card gallery sit behind everything. */
#stars, #gallery { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.backdrop-glow {
  position: fixed; left: 50%; top: 42%; z-index: 0; pointer-events: none;
  width: min(130vw, 1100px); aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(217,164,65,.12) 0%, rgba(var(--accent-rgb),.04) 38%, transparent 66%);
}
.backdrop-shade { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,.35), rgba(0,0,0,.78) 75%); }

/* ------------------------------------------------------------------ header and menu */
.site-header {
  position: sticky; top: 0; z-index: 20; height: var(--header);
  display: flex; align-items: center; gap: 12px; padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  background: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.66));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: baseline; gap: .3em; color: var(--text); text-transform: uppercase; letter-spacing: .1em; font-size: 15px; white-space: nowrap; }
.brand:hover { color: #fff; }
.brand .four { color: var(--brand-red); }
.brand .v2 { color: var(--gold); }
.nav-inline { display: none; gap: 4px; margin-left: 8px; }
.nav-inline a, .menu-link {
  font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
  padding: 8px 10px; border-radius: 999px; white-space: nowrap;
}
.nav-inline a:hover, .menu-link:hover { color: var(--gold-light); background: rgba(217,164,65,.08); }
.nav-inline a[aria-current="page"], .menu-link[aria-current="page"] { color: var(--gold-light); background: rgba(217,164,65,.12); }
.nav-inline a.owner-link { color: var(--gold); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.menu-button {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none;
  border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; color: var(--gold);
}
.menu-button svg { width: 18px; height: 18px; }
@media (min-width: 1100px) { .nav-inline { display: flex; } }
/* Small phones with a wallet connected: everything in the header must fit 390px. */
@media (max-width: 430px) {
  .site-header { gap: 6px; padding-left: 12px; padding-right: 12px; }
  .brand { font-size: 12px; letter-spacing: .06em; }
  .header-right { gap: 6px; }
  #wallet-button { padding: 6px 10px; font-size: 10px; min-height: 34px; }
  .menu-button { width: 36px; height: 36px; }
}

.net-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(0,0,0,.4); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.net-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.net-pill.test .dot { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
@media (max-width: 520px) { .net-pill .net-name { display: none; } .net-pill { padding: 7px; } }

.drawer-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .25s; pointer-events: none; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 31; width: min(360px, 88vw); overflow-y: auto;
  background: var(--panel-solid); border-left: 1px solid var(--line); padding: 20px 18px calc(24px + env(safe-area-inset-bottom));
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
body.menu-open .drawer { transform: none; }
body.menu-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
body.menu-open { overflow: hidden; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.drawer h3 { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; padding-left: 10px; font-weight: 400; }
.drawer .menu-link { display: block; font-size: 12px; padding: 10px; border-radius: 10px; color: var(--text); }
.drawer .menu-link small { display: block; color: var(--muted); font-size: 10px; text-transform: none; letter-spacing: .02em; margin-top: 2px; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px;
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--gold); background: rgba(217,164,65,.12);
  color: var(--gold-light); cursor: pointer; letter-spacing: .06em; font-size: 12px; white-space: nowrap;
  transition: background .2s, box-shadow .2s, opacity .2s, transform .1s;
}
.btn:hover:not(:disabled), .btn:focus-visible { background: rgba(217,164,65,.25); box-shadow: 0 0 18px rgba(217,164,65,.35); color: #fff; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.solid { background: linear-gradient(110deg, var(--gold-dark), var(--gold) 45%, var(--gold-light)); color: #160f02; border-color: var(--gold-light); }
.btn.solid:hover:not(:disabled) { color: #000; box-shadow: 0 0 22px rgba(243,211,138,.5); }
.btn.red { border-color: var(--danger); background: rgba(var(--danger-rgb),.14); color: #ffd9a8; }
.btn.red:hover:not(:disabled) { background: rgba(var(--danger-rgb),.3); box-shadow: 0 0 18px rgba(var(--danger-rgb),.45); }
.btn.ghost { border-color: var(--line); background: transparent; color: var(--text); }
.btn.small { min-height: 32px; padding: 6px 12px; font-size: 11px; }
.btn.block { width: 100%; }
.btn .spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
.link-button { background: none; border: 0; padding: 0; color: var(--gold-light); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ page layout */
.page { position: relative; z-index: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: clamp(24px, 5vh, 56px) var(--gutter) calc(64px + env(safe-area-inset-bottom)); }
.page.narrow { max-width: 860px; }
.page-head { text-align: center; margin-bottom: clamp(24px, 4vh, 44px); }
.eyebrow { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); text-shadow: 0 0 24px rgba(217,164,65,.35); }
h1.title { text-transform: uppercase; font-weight: 400; font-size: clamp(24px, 5vw, 48px); line-height: 1.1; letter-spacing: .1em; padding-left: .1em; margin-top: 10px; text-wrap: balance; }
h1.title .four { color: var(--brand-red); }
h1.title .gold { color: var(--gold); }
.lead { max-width: 680px; margin: 14px auto 0; color: var(--body); font-size: clamp(12px, 1.5vw, 15px); text-wrap: pretty; }
h2.section { font-weight: 400; text-transform: uppercase; letter-spacing: .14em; font-size: clamp(15px, 2.2vw, 20px); color: var(--gold-light); margin: 0 0 14px; }
h3 { font-weight: 400; letter-spacing: .06em; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.gold { color: var(--gold); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.mono { font-variant-numeric: tabular-nums; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.cols { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .cols.two { grid-template-columns: 1fr 1fr; } .cols.side { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }

.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(16px, 2.6vw, 26px); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.panel.glow { box-shadow: 0 0 0 1px rgba(217,164,65,.08), 0 18px 60px rgba(0,0,0,.55); }
.panel + .panel { margin-top: 18px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

/* Big numbers, the way the landing page's countdown looks. */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.stat { text-align: center; padding: 14px 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.35); }
.stat .num { font-size: clamp(20px, 3.4vw, 32px); line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; word-break: break-word; }
.stat .label { margin-top: 6px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.ok { color: var(--ok); border-color: rgba(110,193,228,.4); }
.badge.warn { color: var(--warn); border-color: rgba(231,176,74,.45); }
.badge.bad { color: var(--bad); border-color: rgba(239,107,95,.45); }
.badge.gold { color: var(--gold-light); border-color: var(--line-strong); }

/* ------------------------------------------------------------------ forms */
.field { display: grid; gap: 6px; }
.field > span, .field > label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; min-height: 42px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(0,0,0,.5); color: var(--text); font-size: 13px; outline: none; transition: border-color .2s, box-shadow .2s;
}
textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,164,65,.15); }
.input::placeholder { color: #5f5a50; }
.input.invalid { border-color: var(--bad); }
.hint { font-size: 10px; color: var(--muted); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.4); }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.seg button[aria-pressed="true"] { background: rgba(217,164,65,.2); color: var(--gold-light); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; }
.check input { accent-color: var(--gold); width: 16px; height: 16px; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; border: 1px solid var(--line); }
table.data { width: 100%; border-collapse: collapse; font-size: 12px; }
table.data th { text-align: left; font-weight: 400; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 10px 12px; border-bottom: 1px solid rgba(217,164,65,.08); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ NFT cards (and the M4 flip card) */
.nft-grid { display: grid; gap: clamp(10px, 1.6vw, 18px); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (min-width: 700px) { .nft-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
.nft-card { position: relative; display: block; color: var(--text); }
.nft-card:hover { color: var(--text); }
.nft-card .frame { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #0d0d12; border: 1px solid var(--line); }
.nft-card .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .4s; }
.nft-card .frame img.loading { opacity: 0; }
.nft-card:hover .frame img { transform: scale(1.04); }
.nft-card .caption { padding: 8px 2px 0; display: grid; gap: 2px; }
.nft-card .caption .name { font-size: 12px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nft-card .caption .meta { font-size: 10px; color: var(--muted); letter-spacing: .06em; display: flex; justify-content: space-between; gap: 6px; }
.nft-card .tick { position: absolute; top: 8px; left: 8px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(0,0,0,.65); display: grid; place-items: center; cursor: pointer; }
.nft-card .tick input { accent-color: var(--gold); width: 15px; height: 15px; cursor: pointer; }
.nft-card .corner { position: absolute; top: 8px; right: 8px; z-index: 3; }
.nft-card.selected .frame, .nft-card.selected .flip .face { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 24px rgba(217,164,65,.35); }
/* The marker at the end of a grid that loads more as you scroll: never let the browser pin the page to it. */
#sentinel, .sentinel { overflow-anchor: none; }
.nft-card.dim { opacity: .45; }

/* The M4 flip card: on hover (a tap on phones) it turns horizontally to a solid Top Trumps card with the
   rabbit's name, faction, rank and stats, clear and readable (no image behind it). */
.flip { perspective: 1000px; }
.flip .flip-inner { position: relative; aspect-ratio: 1; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2,.75,.25,1); }
.flip .face { position: absolute; inset: 0; border-radius: 14px; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; border: 1px solid var(--line); background: #0d0d12; }
.flip .face img { width: 100%; height: 100%; object-fit: cover; }
.flip .back { transform: rotateY(180deg); border: 2px solid var(--gold); background: rgba(250, 244, 230, .99); box-shadow: 0 0 22px rgba(217,164,65,.35); }
@media (hover: hover) { .flip:hover .flip-inner { transform: rotateY(180deg); } }
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.trumps { position: absolute; inset: 0; display: flex; flex-direction: column; color: #16110a; }
.trumps .t-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 7px 9px; background: linear-gradient(110deg, #17110a, #2a1f0e); color: var(--gold-light); border-bottom: 2px solid var(--accent); }
.trumps .t-name { font-size: 10px; line-height: 1.2; letter-spacing: .02em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.trumps .t-id { font-size: 11px; color: var(--accent); flex: none; }
.trumps .t-tag { padding: 4px 9px; font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; color: #7a5a14; background: rgba(217,164,65,.18); border-bottom: 1px solid rgba(217,164,65,.45); }
.trumps table { width: 100%; border-collapse: collapse; flex: 1; font-size: 10px; line-height: 1; font-variant-numeric: tabular-nums; }
.trumps td { padding: 0 9px; }
.trumps tr:nth-child(even) td { background: rgba(217,164,65,.14); }
.trumps td:last-child { text-align: right; color: #000; }
.trumps .t-view { padding: 5px; text-align: center; font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; color: #fff; background: #16110a; }
@media (min-width: 700px) { .trumps .t-name { font-size: 11px; } .trumps .t-id { font-size: 12px; } .trumps table { font-size: 11.5px; } .trumps .t-tag { font-size: 9px; } }
@media (prefers-reduced-motion: reduce) {
  .flip .flip-inner { transition: none; }
  .flip .back { transform: none; opacity: 0; transition: opacity .3s; }
  .flip:hover .flip-inner, .flip.flipped .flip-inner { transform: none; }
  .flip:hover .back, .flip.flipped .back { opacity: 1; }
}

/* The tall NFT view: the big image with its card beside it, or below it on phones. */
dialog.modal.nft-view-modal { width: min(1120px, calc(100vw - 16px)); max-height: calc(100svh - 16px); height: calc(100svh - 16px); border-radius: 18px; overflow-y: auto; }
.nft-view { display: grid; grid-template-columns: 1fr; gap: 18px; padding: 16px; min-height: 100%; }
.nv-art { position: relative; border-radius: 14px; overflow: hidden; background: #07070a; border: 1px solid var(--line); align-self: start; }
.nv-art img, .nv-art .placeholder-art { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.nv-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.nv-title { font-weight: 400; font-size: clamp(16px, 2.4vw, 22px); line-height: 1.25; letter-spacing: .04em; color: var(--text); text-transform: none; margin: 0; }
.nv-owner { font-size: 12px; }
.nv-close { position: sticky; top: 10px; float: right; margin: 10px 10px -50px 0; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(0,0,0,.7); color: var(--gold); cursor: pointer; display: grid; place-items: center; }
.nv-close svg { width: 18px; height: 18px; }
@media (min-width: 860px) {
  .nft-view { grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); align-items: start; padding: 22px; gap: 24px; }
  .nv-art { position: sticky; top: 22px; }
}
.trumps.large { position: relative; inset: auto; border-radius: 14px; overflow: hidden; border: 2px solid var(--gold); background: rgba(250, 244, 230, .99); box-shadow: 0 0 26px rgba(217,164,65,.3); }
.trumps.large .t-head { padding: 12px 14px; }
.trumps.large .t-name { font-size: 14px; -webkit-line-clamp: 3; }
.trumps.large .t-id { font-size: 16px; }
.trumps.large .t-tag { padding: 7px 14px; font-size: 10px; }
.trumps.large table { font-size: 14px; }
.trumps.large td { padding: 9px 14px; }
.trait-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.trait { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: rgba(0,0,0,.35); display: grid; gap: 2px; }
.trait span { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.trait strong { font-weight: 400; font-size: 12px; color: var(--gold-light); word-break: break-word; }

/* ------------------------------------------------------------------ loading, empty, progress */
.skeleton { border-radius: 14px; background: linear-gradient(100deg, rgba(255,255,255,.03) 30%, rgba(217,164,65,.08) 50%, rgba(255,255,255,.03) 70%); background-size: 300% 100%; animation: shimmer 1.6s ease-in-out infinite; }
.skeleton.card { aspect-ratio: 1; }
.skeleton.line { height: 12px; margin-top: 8px; border-radius: 6px; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty .big { font-size: 15px; color: var(--text); margin-bottom: 6px; }
.progress { height: 6px; border-radius: 6px; background: rgba(255,255,255,.06); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light)); transition: width .3s; }
.bar-option { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); padding: 12px 14px; background: rgba(0,0,0,.4); }
.bar-option .fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(217,164,65,.28), rgba(217,164,65,.08)); transition: width .6s cubic-bezier(.2,.7,.2,1); }
.bar-option > *:not(.fill) { position: relative; }

/* ------------------------------------------------------------------ toasts and dialogs */
.toasts { position: fixed; z-index: 50; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 12px 14px; border-radius: 14px;
  background: var(--panel-solid); border: 1px solid var(--line-strong); box-shadow: 0 10px 40px rgba(0,0,0,.6); font-size: 12px;
  animation: rise .35s ease-out both;
}
.toast .icon { width: 18px; height: 18px; border-radius: 50%; margin-top: 1px; display: grid; place-items: center; font-size: 11px; color: #000; background: var(--gold); }
.toast.ok .icon { background: var(--ok); } .toast.bad .icon { background: var(--bad); }
.toast.pending .icon { background: transparent; border: 2px solid var(--gold); border-right-color: transparent; animation: spin .8s linear infinite; }
.toast .close { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 2px; }
.toast .sub { color: var(--muted); font-size: 11px; margin-top: 2px; word-break: break-word; }
dialog.modal {
  margin: auto; width: min(520px, calc(100vw - 32px)); max-height: calc(100svh - 48px); overflow: auto; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 18px; background: var(--panel-solid); color: var(--text);
  box-shadow: 0 30px 90px rgba(0,0,0,.8);
}
dialog.modal::backdrop { background: rgba(0,0,0,.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog.modal .modal-body { padding: 22px; }
dialog.modal h2 { font-weight: 400; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 10px; }
dialog.modal .modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.addr { font-variant-numeric: tabular-nums; }
.copy { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 0 4px; }
.copy:hover { color: var(--gold-light); }

.site-footer { position: relative; z-index: 1; text-align: center; padding: 26px var(--gutter) calc(30px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 10px; letter-spacing: .1em; border-top: 1px solid var(--line); background: rgba(0,0,0,.55); }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--gold-light); }
.site-footer .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-bottom: 10px; text-transform: uppercase; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.reveal { animation: rise .9s ease-out both; }
@media (prefers-reduced-motion: reduce) { .reveal, .toast { animation: none; } html { scroll-behavior: auto; } }
