/* ============================================================
   HOODWIN — app shell
   Top bar (SolPump-style pills) · chat rail · games strip ·
   game stage · dropdowns · missions · modals
   ============================================================ */

html, body { height: 100%; }

body.app {
  display: grid;
  grid-template-rows: 80px 1fr;
  grid-template-columns: 300px 1fr;
  grid-template-areas:
    "header header"
    "chat   main";
  overflow: hidden;
}

body.app.chat-hidden { grid-template-columns: 0 1fr; }
body.app.chat-hidden .chat { display: none; }

/* ================= Top bar ================= */

.app-header {
  grid-area: header;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  background: linear-gradient(180deg, #17181c 0%, #121316 100%);
  border-bottom: 1px solid var(--line-hair);
  z-index: 60;
}

/* The animated HOOD ◆ WIN lockup (see .brandmark in ui.css). Only its
   size is set here — everything else travels with the component. */
.app-header .brandmark { --logo-h: 58px; flex: 0 0 auto; }

/* nudge the Games control a little clear of the logo */
.app-header #gamesPill { margin-left: 12px; }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-hair);
  background: var(--bg-panel);
  color: var(--text-mid);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), transform var(--t-fast);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-hi); transform: translateY(-1px); }
.icon-btn:active { transform: translateY(0); }
.icon-btn svg { width: 23px; height: 23px; }

.icon-btn__dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-400);
  box-shadow: 0 0 8px var(--win-glow);
  animation: dotPulse 1.6s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: 0.55; }
}

/* --- pills --- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  height: 50px;
  padding: 0 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-hair);
  background: var(--bg-panel);
  color: var(--text-mid);
  font: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast),
              color var(--t-fast), box-shadow var(--t-med), transform var(--t-fast);
}
.pill:hover { background: var(--bg-hover); color: var(--text-hi); transform: translateY(-1px); }
.pill svg { width: 21px; height: 21px; flex: none; }
.pill .chev { width: 14px; height: 14px; opacity: .6; transition: transform var(--t-fast); }
.pill.is-open .chev { transform: rotate(180deg); }

/* balance pill — the glowing centrepiece.
   The Ethereum disc sits at native colour rather than being tinted
   by the accent: it is a real asset mark, not decoration, so it
   stays recognisable whichever accent the player picks. */
.pill--balance {
  height: 56px;
  padding: 0 6px 0 13px;
  gap: 12px;
  border-color: rgba(0, 217, 95, 0.45);
  background: linear-gradient(180deg, #101b14, #0d1410);
  box-shadow: 0 0 0 1px rgba(0,217,95,.08), 0 0 18px rgba(0,217,95,.14), inset 0 1px 0 rgba(255,255,255,.04);
  cursor: default;
}
.pill--balance:hover { transform: none; background: linear-gradient(180deg, #101b14, #0d1410); }

/* The currency-switching balance-pod (currency.css) brings its own
   chip styling — background, border, shadow — which would double up
   with the outer glow this pill already provides. Stripped down to
   just its layout inside here so only one shell shows. */
.pill--balance .balance-pod__main {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  gap: 0.55rem;
}
.pill--balance .balance-pod__main:hover { background: transparent; }

/* Scale the pod's own pieces up to sit right in the taller bar, and
   left-align the label + number so they read as one stacked unit
   instead of the number drifting off to the right. */
.pill--balance .balance-pod__mark { width: 34px; height: 34px; }
.pill--balance .balance-pod__mark svg { width: 20px; height: 20px; }
.pill--balance .balance-pod__label { font-size: 0.56rem; }
.pill--balance .balance-pod__value { text-align: left; font-size: 1.08rem; }
.pill--balance .balance-pod__code { font-size: 0.64rem; padding: 0.2rem 0.44rem; }
.pill--balance .balance-pod__caret { width: 17px; height: 17px; }

/* the Deposit button matches the pod's height so the two halves of
   the pill are the same size rather than one dwarfing the other */
.pill--balance .btn { height: 40px; align-self: center; }

/* rewards pill */
.pill--rewards { border-color: rgba(0, 217, 95, 0.3); position: relative; overflow: hidden; }
.pill--rewards::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(147,247,184,.14) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: pillShimmer 3.4s linear infinite;
  pointer-events: none;
}
@keyframes pillShimmer {
  0% { background-position: 180% 0; }
  100% { background-position: -70% 0; }
}
.pill--rewards .pill__stack { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.pill--rewards .pill__top { color: var(--text-hi); font-family: var(--font-num); font-size: 0.9rem; }
.pill--rewards .pill__sub { color: var(--accent-400); font-size: 0.72rem; font-weight: 700; letter-spacing: .04em; }
.pill--rewards .gift { color: var(--accent-300); }

.pill__badge {
  min-width: 20px; height: 20px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--accent-400);
  color: var(--text-on-accent);
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* avatar */
.avatar-wrap { position: relative; display: flex; align-items: center; gap: 7px; cursor: pointer; }
.avatar {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-hair);
  background: var(--bg-panel);
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-med);
}
.avatar-wrap:hover .avatar { border-color: var(--line-strong); box-shadow: var(--glow-accent); }
.avatar svg,
.avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.avatar__lvl {
  position: absolute;
  bottom: -5px; left: -5px;
  min-width: 21px; height: 21px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--accent-gradient-soft);
  border: 1.5px solid #0d0e10;
  color: #04210e;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-wrap .chev { width: 14px; height: 14px; }

/* the Sign-in call to action sits in this row too — bring it up to
   match the enlarged pills rather than staying a small button.
   Scoped to the link itself so the Deposit button inside the balance
   pill keeps its own smaller sizing. */
.app-header #signInLink {
  height: 44px;
  padding: 0 20px;
  font-size: 0.8rem;
}

.app-header__spacer { flex: 1; }

/* ================= Dropdowns ================= */

.dropdown {
  position: fixed;
  top: 70px;
  min-width: 230px;
  background: var(--bg-raised);
  border: 1px solid var(--line-hair);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  padding: 8px;
  z-index: 80;
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  pointer-events: none;
  transition: opacity var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.dropdown.is-open { opacity: 1; transform: none; pointer-events: auto; }

.dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text-mid);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background var(--t-fast), color var(--t-fast), padding-left var(--t-fast);
}
.dropdown__item:hover { background: var(--bg-hover); color: var(--text-hi); padding-left: 14px; }
.dropdown__item.is-active { color: var(--accent-300); }
.dropdown__item svg { width: 20px; height: 20px; flex: none; }
/* Game icons are illustrations, not glyphs — they get a recessed
   tile of their own so they read as artwork rather than list bullets. */
.dropdown__item .mini-art {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 3px;
  border-radius: var(--r-sm);
  background: var(--bg-inset);
  border: 1px solid var(--line-soft);
  transition: border-color var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.dropdown__item .mini-art svg { width: 100%; height: 100%; display: block; }
.dropdown__item:hover .mini-art { border-color: var(--line-strong); transform: scale(1.06); }
.dropdown__item.is-active .mini-art { border-color: var(--accent-400); }

.dropdown__sep { height: 1px; margin: 6px 4px; background: var(--line-soft); border: none; }

.dropdown__head {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 6px;
}
.dropdown__head .name { color: var(--text-hi); font-weight: 700; }
.dropdown__head .addr { color: var(--text-faint); font-family: var(--font-num); font-size: 0.74rem; }

.lvlbar { margin-top: 8px; }
.lvlbar__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-low);
  margin-bottom: 4px;
}
.lvlbar__track {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--bg-inset);
  overflow: hidden;
}
.lvlbar__fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--accent-gradient-soft);
  box-shadow: 0 0 8px var(--win-glow);
  transition: width .6s var(--ease-out);
}

/* notifications */
.dropdown--notif { width: 300px; max-height: 380px; overflow-y: auto; }
.notif {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: var(--r-md);
  font-size: 0.82rem;
  color: var(--text-mid);
  align-items: flex-start;
}
.notif:hover { background: var(--bg-hover); }
.notif__ico { color: var(--accent-400); flex: none; margin-top: 1px; }
.notif__ico svg { width: 16px; height: 16px; }
.notif__time { display: block; color: var(--text-faint); font-size: 0.68rem; margin-top: 2px; }
.notif--empty { justify-content: center; color: var(--text-faint); padding: 22px 10px; }

/* ================= Chat rail ================= */

.chat {
  grid-area: chat;
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border-right: 1px solid var(--line-hair);
  min-height: 0;
}

.chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-hair);
  color: var(--text-hi);
  font-weight: 600;
  font-size: 0.92rem;
}
.chat__online { font-size: 0.75rem; color: var(--accent-400); font-weight: 500; }
.chat__online::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--accent-400);
  box-shadow: 0 0 8px var(--win-glow);
  animation: dotPulse 2.2s ease-in-out infinite;
}

.chat__feed {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.chat__msg {
  background: var(--bg-panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 8px 10px;
  font-size: 0.85rem;
  animation: msgIn .3s var(--ease-out);
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.chat__msg--self { border-color: var(--line-strong); }
.chat__meta { display: flex; justify-content: space-between; margin-bottom: 3px; }
.chat__user { color: var(--accent-300); font-weight: 600; font-size: 0.78rem; }
.chat__msg--self .chat__user { color: var(--accent-100); }
.chat__time { color: var(--text-faint); font-size: 0.7rem; }
.chat__text { color: var(--text-mid); word-wrap: break-word; }

.chat__form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line-hair);
}
.chat__form input {
  flex: 1;
  min-width: 0;
  background: var(--bg-inset);
  border: 1px solid var(--line-hair);
  border-radius: var(--r-md);
  color: var(--text-hi);
  padding: 9px 12px;
  font-size: 0.85rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.chat__form input:focus { outline: none; border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(0,217,95,.1); }

/* --- moderation feedback --- */

/* A refused message shakes the composer, so the rejection registers
   even if the toast is missed. */
.chat__form.is-rejected { animation: chatReject 420ms var(--ease-in-out); }
@keyframes chatReject {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-6px); }
  48% { transform: translateX(6px); }
  74% { transform: translateX(-3px); }
}
.chat__form.is-rejected input { border-color: rgba(239, 74, 92, .75); }

.chat__form.is-muted input {
  border-color: rgba(239, 74, 92, .4);
  background: rgba(239, 74, 92, .07);
  color: var(--text-low);
  cursor: not-allowed;
}
.chat__form.is-muted input::placeholder { color: var(--loss); }
.chat__form.is-muted button { opacity: .4; pointer-events: none; }

/* ================= Floating chat toggle =================

   Docked to the bottom-left corner instead of sitting in the header
   next to the logo. It tracks the chat rail's open/closed edge —
   flush against the panel when it's open, back at the screen edge
   once it's collapsed — so it always reads as "the handle for that
   panel" rather than a stray button floating in space. */

.chat-fab {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 65;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-hair);
  background: linear-gradient(165deg, var(--bg-panel), var(--bg-raised));
  color: var(--text-mid);
  cursor: pointer;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: left var(--t-med) var(--ease-out), color var(--t-fast),
              border-color var(--t-fast), transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-med);
}
.chat-fab:hover { color: var(--text-hi); border-color: var(--line-strong); transform: translateY(-2px); }
.chat-fab:active { transform: translateY(0) scale(.96); }
.chat-fab[aria-pressed="true"] { color: var(--accent-300); border-color: rgba(0, 217, 95, 0.4); box-shadow: var(--shadow-lg), var(--glow-accent); }

.chat-fab__icon { width: 24px; height: 24px; }
.chat-fab__dot { transition: opacity var(--t-fast); }
/* the three "someone's typing" dots only read as active chatter when
   the panel is actually open — a closed panel shouldn't imply a live
   conversation nobody can see */
.chat-fab:not([aria-pressed="true"]) .chat-fab__dot { opacity: .45; }

/* the unread signal: a small neon point that only exists to say
   "something happened while you weren't looking" */
.chat-fab__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent-400);
  border: 2px solid var(--bg-base);
  box-shadow: 0 0 6px var(--win-glow), 0 0 16px var(--win-glow);
  animation: chatFabPulse 1.5s ease-in-out infinite;
}
@keyframes chatFabPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 6px var(--win-glow), 0 0 16px var(--win-glow); }
  50% { transform: scale(1.25); box-shadow: 0 0 10px var(--win-glow), 0 0 26px var(--win-glow); }
}

/* docked against the open rail on desktop; back at the edge once
   chat-hidden collapses it to nothing */
body.app:not(.chat-hidden) .chat-fab { left: 316px; }

@media (max-width: 900px) {
  /* the mobile overlay rail is a fixed panel of its own, not part of
     the grid, so its width has to be matched by hand */
  body.app.chat-open-mobile .chat-fab { left: calc(min(320px, 88vw) + 12px); }
}

/* ================= Main column ================= */

.app-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  background:
    radial-gradient(1100px 420px at 70% -140px, rgba(0, 217, 95, 0.05), transparent 60%),
    var(--bg-base);
}

/* Game stage */

.stage {
  flex: 1;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 18px 18px;
}
.stage__frame {
  flex: 1;
  width: 100%;
  border: 1px solid var(--line-hair);
  border-radius: var(--r-xl);
  background: var(--bg-void);
  box-shadow: var(--shadow-lg);
  animation: stageIn .4s var(--ease-out);
}
@keyframes stageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ================= Modals ================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 6, 0.72);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: backdropIn .18s ease-out;
}
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
.modal-backdrop[hidden] { display: none; }

.modal {
  width: min(540px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--bg-raised);
  border: 1px solid var(--line-hair);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  padding: 22px;
  animation: modalIn .26s var(--ease-spring);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: none; }
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modal__title { font-size: 1.1rem; font-weight: 700; color: var(--text-hi); }

.modal__tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line-hair);
  padding-bottom: 10px;
}
.modal__tab {
  border: none;
  background: transparent;
  color: var(--text-low);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.modal__tab:hover { color: var(--text-hi); background: var(--bg-hover); }
.modal__tab.is-active { color: var(--text-on-accent); background: var(--accent-400); }

.modal .field { margin-bottom: 14px; }
.modal .field label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-low);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.modal .field input {
  width: 100%;
  background: var(--bg-inset);
  border: 1px solid var(--line-hair);
  border-radius: var(--r-md);
  color: var(--text-hi);
  padding: 10px 12px;
  font-size: 0.95rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.modal .field input:focus { outline: none; border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(0,217,95,.1); }

.kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.9rem;
}
.kv:last-child { border-bottom: none; }
.kv__k { color: var(--text-low); }
.kv__v { color: var(--text-hi); font-family: var(--font-num); }

.code-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-inset);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-family: var(--font-num);
  font-size: 1.15rem;
  letter-spacing: 0.18em;
  color: var(--accent-300);
}

.affil-note {
  font-size: 0.8rem;
  color: var(--text-low);
  line-height: 1.5;
  margin: 10px 0 16px;
}

.modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

/* Wallet options in the connect modal live in ui.css — one source
   of truth, since the sign-in page renders the same component. */

/* ================= Missions ================= */

.modal--wide { width: min(640px, 100%); }
.modal--xwide { width: min(880px, 100%); }

.mission {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--bg-panel);
  transition: border-color var(--t-fast), box-shadow var(--t-med);
}
.mission:hover { border-color: var(--line-strong); }
.mission--done { border-color: rgba(0,217,95,.5); box-shadow: 0 0 14px rgba(0,217,95,.1); }
.mission--claimed { opacity: .5; }

.mission__ico {
  width: 42px; height: 42px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--bg-inset);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mission__ico svg { width: 26px; height: 26px; }

.mission__body { flex: 1; min-width: 0; }
.mission__title { font-weight: 700; color: var(--text-hi); font-size: 0.92rem; }
.mission__desc { font-size: 0.78rem; color: var(--text-low); margin: 2px 0 8px; }

.mission__track {
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--bg-inset);
  overflow: hidden;
}
.mission__fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--accent-gradient-soft);
  box-shadow: 0 0 8px var(--win-glow);
  transition: width .7s var(--ease-out);
}
.mission__count { font-family: var(--font-num); font-size: 0.72rem; color: var(--text-low); margin-top: 4px; display: block; }

.mission__side { flex: none; text-align: right; }
.mission__reward {
  font-family: var(--font-num);
  color: var(--accent-300);
  font-size: 0.88rem;
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}

/* ================= $HOODWIN token ================= */

/* loading shimmer — reused for any figure that isn't live yet */
.skeleton {
  display: inline-block;
  border-radius: 5px;
  background: linear-gradient(100deg,
    rgba(255,255,255,0.05) 30%,
    rgba(255,255,255,0.14) 50%,
    rgba(255,255,255,0.05) 70%);
  background-size: 220% 100%;
  animation: skeletonSweep 1.35s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes skeletonSweep {
  0% { background-position: 180% 0; }
  100% { background-position: -80% 0; }
}
.skeleton--price   { width: 52px; height: 11px; }
.skeleton--price-lg{ width: 108px; height: 22px; border-radius: 7px; }
.skeleton--chip    { width: 56px; height: 18px; border-radius: var(--r-pill); }
.skeleton--stat    { width: 70px; height: 15px; }
.skeleton--sm      { width: 90px; height: 13px; }
.skeleton--ca      { width: 100%; height: 15px; }

/* token pill in the header */
.pill--token {
  border-color: rgba(0, 217, 95, 0.35);
  background: linear-gradient(180deg, #10231a, #0d1712);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 0 0 1px rgba(0,217,95,.05);
}
.pill--token:hover { border-color: rgba(0, 217, 95, 0.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), var(--glow-accent); }
.pill--token .pill__stack {
  display: flex; flex-direction: column; align-items: flex-start; line-height: 1.16;
}
.pill--token .pill__top {
  color: var(--text-hi); font-family: var(--font-num);
  font-size: 0.88rem; font-weight: 700; letter-spacing: .02em;
}
.pill--token .token-pill__price {
  color: var(--accent-300); font-family: var(--font-num); font-size: 0.72rem;
  display: flex; align-items: center; min-height: 12px;
}

/* ---- the coin, given real presence in the header ----

   Scoped to the pill so the large coin on the token page keeps its
   own treatment. Bigger, a breathing emerald glow that hugs the
   round silhouette, a crisp rim, and a single point of light that
   orbits the edge — the small-scale read of a struck casino chip
   catching the room lights as it turns. */
.pill--token .token-coin {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,217,95,.35), inset 0 0 0 1px rgba(214,255,230,.12);
  animation: tokenCoinGlow 2.8s var(--ease-in-out) infinite;
  transition: transform var(--t-med) var(--ease-spring);
}
.pill--token:hover .token-coin { transform: scale(1.08); }
.pill--token .token-coin svg { border-radius: 50%; }

@keyframes tokenCoinGlow {
  0%, 100% { filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)) drop-shadow(0 0 3px rgba(0,217,95,.35)); }
  50%      { filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)) drop-shadow(0 0 10px rgba(0,217,95,.85)); }
}

/* the travelling glint around the rim — a bright arc masked to a
   thin ring, rotated forever */
.pill--token .token-coin::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent 0 55%,
    rgba(0,217,95,.25) 68%,
    rgba(214,255,230,.98) 78%,
    rgba(0,217,95,.25) 88%,
    transparent 96%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  animation: tokenCoinOrbit 3.4s linear infinite;
  pointer-events: none;
}
.pill--token:hover .token-coin::after { animation-duration: 1.5s; }
@keyframes tokenCoinOrbit { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .pill--token .token-coin { animation: none; }
  .pill--token .token-coin::after { animation: none; opacity: .5; }
}
:root[data-motion="off"] .pill--token .token-coin { animation: none; }
:root[data-motion="off"] .pill--token .token-coin::after { animation: none; opacity: .5; }

.token-coin { width: 28px; height: 28px; flex: none; display: inline-flex;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.token-coin svg { width: 100%; height: 100%; }
.token-coin--lg {
  width: 58px; height: 58px;
  filter: drop-shadow(0 3px 10px rgba(0,217,95,.28));
}
/* a slow catch-the-light sweep across the big chip */
.token-coin--lg { position: relative; }
/* pulsing halo behind the chip */
.token-coin--lg::before {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,217,95,.40), transparent 66%);
  z-index: -1;
  animation: chipHalo 2.8s ease-in-out infinite;
}
@keyframes chipHalo {
  0%, 100% { transform: scale(0.9);  opacity: .45; }
  50%      { transform: scale(1.15); opacity: .8; }
}
.token-coin--lg::after {
  content: "";
  position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.28) 50%, transparent 62%);
  background-size: 250% 100%;
  animation: coinSheen 3.6s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}
@keyframes coinSheen {
  0%   { background-position: 160% 0; }
  55%  { background-position: -60% 0; }
  100% { background-position: -60% 0; }
}

/* animated "loading" tag on the inert action buttons */
.tag-loading {
  display: inline-flex; align-items: center;
  font-size: 0.66rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .75;
}
.tag-loading::after {
  content: "…";
  width: 0.9em; text-align: left;
  animation: loadingDots 1.5s steps(1) infinite;
}
@keyframes loadingDots {
  0%   { content: "·"; }
  33%  { content: "··"; }
  66%  { content: "···"; }
  100% { content: "·"; }
}

/* --- token modal --- */
/* The card itself doesn't scroll — it holds a fixed ambient layer that
   always fills the visible card, with the content scrolling in its own
   wrapper on top. That way the aurora never scrolls away or leaves a
   gap under long content. */
.token-modal {
  position: relative; overflow: hidden; padding: 0;
  display: flex; flex-direction: column;
}
.token-modal__scroll {
  position: relative; z-index: 1;
  flex: 1; min-height: 0;
  overflow-y: auto; padding: 22px;
}

/* ambient background: two drifting accent auroras + floating chips.
   overflow:hidden keeps the blurred blobs inside the rounded card. */
.token-fx {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
  border-radius: inherit;
  background: radial-gradient(120% 80% at 50% -20%, rgba(0,217,95,0.10), transparent 60%);
}
.token-fx::before, .token-fx::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(46px); opacity: .55;
}
.token-fx::before {
  width: 260px; height: 260px; left: -60px; top: -80px;
  background: radial-gradient(circle, var(--accent-400), transparent 68%);
  animation: fxDrift1 16s ease-in-out infinite alternate;
}
.token-fx::after {
  width: 240px; height: 240px; right: -70px; bottom: -60px;
  background: radial-gradient(circle, var(--accent-600), transparent 66%);
  animation: fxDrift2 21s ease-in-out infinite alternate;
}
@keyframes fxDrift1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.18); }
}
@keyframes fxDrift2 {
  0%   { transform: translate(0, 0) scale(1.1); }
  100% { transform: translate(-50px, -30px) scale(0.92); }
}

/* small chip glyphs floating slowly upward */
.token-fx__chip {
  position: absolute; bottom: -24px;
  width: 22px; height: 22px; border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, var(--accent-300), var(--accent-700) 72%);
  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,.25),
    inset 0 0 0 4px rgba(255,255,255,.10),
    0 0 10px rgba(0,217,95,.25);
  opacity: 0;
  animation: fxFloat 15s linear infinite;
}
/* dashed edge-spots on each floating chip */
.token-fx__chip::before {
  content: ""; position: absolute; inset: 2px; border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.35);
}
.token-fx__chip:nth-child(1) { left: 12%; animation-delay: 0s;    transform: scale(.8); }
.token-fx__chip:nth-child(2) { left: 34%; animation-delay: 4.5s;  transform: scale(1.15); }
.token-fx__chip:nth-child(3) { left: 55%; animation-delay: 8s;    transform: scale(.7); }
.token-fx__chip:nth-child(4) { left: 72%; animation-delay: 2.5s;  transform: scale(1); }
.token-fx__chip:nth-child(5) { left: 88%; animation-delay: 11s;   transform: scale(.9); }
@keyframes fxFloat {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  12%  { opacity: .5; }
  85%  { opacity: .5; }
  100% { transform: translateY(-440px) rotate(220deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .token-fx::before, .token-fx::after, .token-fx__chip,
  .token-coin--lg::after, .token-coin--lg::before { animation: none; }
  .token-fx__chip { display: none; }
}

.token-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 4px 0 18px;
}
.token-hero__body { flex: 1; min-width: 0; }
.token-hero__name {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 1.02rem; font-weight: 700; color: var(--text-hi);
}
.token-hero__sub {
  font-size: 0.8rem; color: var(--text-low); line-height: 1.45; margin-top: 4px;
}
.token-hero__price { text-align: right; flex: none; }
.token-hero__price-v {
  display: block; font-family: var(--font-num); font-size: 1.35rem;
  font-weight: 700; color: var(--text-hi); min-height: 24px;
}
.token-hero__price-chg { display: inline-flex; margin-top: 4px; }

.token-badge {
  font-size: 0.62rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-200);
  background: rgba(0, 217, 95, 0.12);
  border: 1px solid rgba(0, 217, 95, 0.35);
  border-radius: var(--r-pill);
  padding: 3px 9px;
}

/* chart skeleton */
.token-chart {
  position: relative;
  height: 128px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-hair);
  background:
    linear-gradient(180deg, rgba(0,217,95,0.05), transparent 70%),
    var(--bg-inset);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.token-chart__skeleton { position: absolute; inset: 0; }
.token-chart__ghost {
  position: absolute; inset: 0; width: 100%; height: 100%;
  color: rgba(0, 217, 95, 0.22);
}
.token-chart__pulse {
  position: absolute; inset: 0;
  background: linear-gradient(100deg,
    transparent 35%, rgba(0,217,95,0.10) 50%, transparent 65%);
  background-size: 220% 100%;
  animation: skeletonSweep 1.8s ease-in-out infinite;
}
.token-chart__label {
  position: relative;
  font-size: 0.76rem; font-weight: 600; letter-spacing: .04em;
  color: var(--text-mid);
  background: rgba(5,5,6,0.55);
  border: 1px solid var(--line-hair);
  border-radius: var(--r-pill);
  padding: 5px 12px;
}

/* market stat grid */
.token-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 18px;
}
.token-stat {
  background: var(--bg-inset);
  border: 1px solid var(--line-hair);
  border-radius: var(--r-md);
  padding: 11px 12px;
}
.token-stat__k {
  display: block; font-size: 0.68rem; color: var(--text-low);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px;
}
.token-stat__v {
  display: block; font-family: var(--font-num); font-size: 0.95rem;
  color: var(--text-hi); min-height: 16px;
}

/* contract address */
.token-ca { margin-bottom: 16px; }
.token-ca__label {
  display: block; font-size: 0.72rem; color: var(--text-low);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 7px;
}
.token-ca__row { display: flex; align-items: center; gap: 10px; }
.token-ca__value {
  flex: 1; min-width: 0;
  display: flex; align-items: center;
  background: var(--bg-inset);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-family: var(--font-num); font-size: 0.86rem;
  color: var(--accent-300);
  overflow: hidden; white-space: nowrap;
}

.token-details { margin-bottom: 8px; }
.token-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.token-actions .btn { flex: 1; }
.token-note { margin-top: 14px; margin-bottom: 0; }

@media (max-width: 560px) {
  .token-stats { grid-template-columns: repeat(2, 1fr); }
  .token-hero { flex-wrap: wrap; }
  .token-hero__price { text-align: left; width: 100%; }
}

/* ================= Responsive ================= */

@media (max-width: 1180px) {
  .pill--rewards .pill__stack { display: none; }
  .pill--token .pill__stack { display: none; }
  .pill span.pill__label { display: none; }
}

@media (max-width: 900px) {
  body.app {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main";
  }
  .chat { display: none; }
  body.app.chat-open-mobile .chat {
    display: flex;
    position: fixed;
    top: 80px; left: 0; bottom: 0;
    width: min(320px, 88vw);
    z-index: 50;
    box-shadow: var(--shadow-xl);
  }
  .pill--balance .balance-pod__value { min-width: 0; }
  .stage { padding: 10px 10px 12px; min-height: 460px; }
}

/* ============================================================
   Site footer (lobby + FAQ page)
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--line-hair);
  background: linear-gradient(180deg, var(--bg-base), #101114);
  margin-top: auto;
}
.site-footer__inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 40px 64px;
  padding: 40px 28px 28px;
}
.site-footer__brand { flex: 1 1 300px; max-width: 400px; min-width: 260px; }
.site-footer__logo { display: inline-flex; align-items: center; text-decoration: none; }
.site-footer__logo-img { height: 34px; width: auto; display: block; }
.site-footer__blurb {
  margin: 14px 0 16px; font-size: 0.82rem; line-height: 1.6; color: var(--text-mid);
}
.site-footer__socials { display: flex; gap: 10px; margin-bottom: 16px; }
.site-footer__socials a {
  width: 38px; height: 38px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--bg-panel); border: 1px solid var(--line-hair);
  color: var(--text-mid); transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.site-footer__socials a:hover { color: var(--accent-300); border-color: var(--line-strong); transform: translateY(-2px); }
.site-footer__socials a.is-soon { opacity: 0.5; cursor: not-allowed; }
.site-footer__socials svg { width: 18px; height: 18px; }
.site-footer__legal {
  font-size: 0.72rem; line-height: 1.55; color: var(--text-low); margin: 0 0 12px;
}
.site-footer__contact {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; color: var(--text-mid); text-decoration: none;
}
.site-footer__contact:hover { color: var(--accent-300); }

.site-footer__cols { display: flex; flex-wrap: wrap; gap: 32px 56px; }
.site-footer__col { display: flex; flex-direction: column; gap: 11px; min-width: 96px; }
.site-footer__col h4 {
  font-size: 0.82rem; font-weight: 700; color: var(--text-hi);
  margin: 0 0 4px; text-transform: none;
}
.site-footer__col a {
  font-size: 0.82rem; color: var(--text-low); text-decoration: none;
  transition: color var(--t-fast); cursor: pointer;
}
.site-footer__col a:hover { color: var(--text-hi); }
.site-footer__col a.is-accent { color: var(--accent-300); font-weight: 600; }

.site-footer__bar {
  border-top: 1px solid var(--line-hair);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  max-width: 1180px; margin: 0 auto; padding: 16px 28px;
  font-size: 0.75rem; color: var(--text-low);
}
.site-footer__bar a { color: var(--text-mid); text-decoration: none; }
.site-footer__bar a:hover { color: var(--accent-300); }

@media (max-width: 640px) {
  .site-footer__inner { gap: 28px; padding: 28px 18px 20px; }
  .site-footer__cols { gap: 24px 40px; }
}

/* ============================================================
   FAQ page
   ============================================================ */

body.page {
  display: flex; flex-direction: column; min-height: 100vh;
  background:
    radial-gradient(1100px 460px at 70% -160px, rgba(0, 217, 95, 0.06), transparent 60%),
    var(--bg-base);
}
.faq-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 24px; height: 72px;
  border-bottom: 1px solid var(--line-hair);
  background: linear-gradient(180deg, #17181c, #121316);
  position: sticky; top: 0; z-index: 20;
}
.faq-header__logo { display: inline-flex; align-items: center; text-decoration: none; }
.faq-header__logo img { height: 32px; width: auto; display: block; }

.faq {
  width: 100%; max-width: 820px; margin: 0 auto; padding: 44px 24px 60px; flex: 1;
}
.faq__eyebrow {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-400); margin-bottom: 10px;
}
.faq__title { font-size: 2rem; font-weight: 800; color: var(--text-hi); margin: 0 0 8px; }
.faq__intro { font-size: 0.92rem; color: var(--text-mid); line-height: 1.6; margin: 0 0 8px; }
.faq__section-title {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-low); margin: 34px 0 12px;
}
.faq__list { display: flex; flex-direction: column; gap: 10px; }
.faq__q {
  border: 1px solid var(--line-hair); border-radius: var(--r-lg);
  background: var(--bg-panel); overflow: hidden;
  transition: border-color var(--t-fast);
}
.faq__q[open] { border-color: var(--line-strong); }
.faq__q summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 18px; font-size: 0.95rem; font-weight: 600; color: var(--text-hi);
}
.faq__q summary::-webkit-details-marker { display: none; }
.faq__q summary::after {
  content: ""; flex: 0 0 auto; width: 10px; height: 10px;
  border-right: 2px solid var(--text-low); border-bottom: 2px solid var(--text-low);
  transform: rotate(45deg); transition: transform var(--t-fast);
}
.faq__q[open] summary::after { transform: rotate(-135deg); }
.faq__q summary:hover { color: var(--accent-200); }
.faq__a { padding: 0 18px 16px; font-size: 0.88rem; line-height: 1.65; color: var(--text-mid); }
.faq__a p { margin: 0 0 10px; }
.faq__a p:last-child { margin-bottom: 0; }
.faq__a strong { color: var(--text-hi); }
.faq__a a { color: var(--accent-300); }
.faq__a code {
  font-family: var(--font-num); font-size: 0.82em;
  background: var(--bg-inset); border: 1px solid var(--line-hair);
  border-radius: 6px; padding: 1px 6px; color: var(--accent-200);
}
.faq__cta {
  margin-top: 30px; padding: 20px; border-radius: var(--r-lg);
  border: 1px solid var(--line-hair);
  background: radial-gradient(120% 120% at 15% 0%, rgba(0,217,95,0.1), transparent 55%), var(--bg-inset);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.faq__cta-text strong { display: block; color: var(--text-hi); font-size: 0.95rem; margin-bottom: 3px; }
.faq__cta-text span { font-size: 0.82rem; color: var(--text-mid); }
