/* cardesk — collector experience V1
   New global chrome, rooms, command palette, compare tray.
   Layered on top of the existing inline styles in index.html.
*/

/* ── tokens (extend existing) ─────────────────────────────────── */
:root {
  --topbar-h: 56px;
  --cyan: #5DEAFF;
  --cyan-soft: rgba(93, 234, 255, 0.10);
  --cyan-hairline: rgba(93, 234, 255, 0.22);
  --gold: #FFD466;
  --gold-soft: rgba(255, 212, 102, 0.10);
  --bg-elev: #11141A;
  --bg-room: #0B0D11;
  --hr: rgba(255, 255, 255, 0.07);
  --hr-strong: rgba(255, 255, 255, 0.11);
  --text-1: #EFF1F5;
  --text-2: #A8AEBA;
  --text-3: #6E7587;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── topbar (sticky global header) ─────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: rgba(11, 13, 17, 0.82);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border-bottom: 1px solid var(--hr);
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  letter-spacing: -0.005em;
  /* outer pad mirrors #route-content's 24px so .topbar-inner aligns with .room */
  padding: 0 24px;
}

/* Inner container — same max-width as .room so logo/search align with content.
   No internal padding (the outer .topbar provides edge spacing on small screens). */
.topbar-inner {
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--text-1);
  text-decoration: none;
}

.topbar .brand .cmark { color: var(--cyan); }

.topbar .search {
  flex: 1;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hr-strong);
  border-radius: 99px;
  cursor: text;
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}

.topbar .search:hover { border-color: var(--cyan-hairline); }
.topbar .search:focus-within {
  border-color: var(--cyan);
  background: rgba(255, 255, 255, 0.06);
}

.topbar .search-icon {
  width: 14px; height: 14px;
  color: var(--text-3);
  flex-shrink: 0;
}

.topbar .search-placeholder {
  flex: 1;
  color: var(--text-3);
  font-size: 13px;
  letter-spacing: 0;
}

.topbar .search-hint {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.topbar .search-hint kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 20px;
  padding: 0 5px;
  font-size: 11px;
  line-height: 1;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hr);
  border-radius: 4px;
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
}

.topbar .nav {
  display: flex;
  align-items: center;
  gap: 4px;
  /* nav sits adjacent to search; only badges (watchlist/tracking) push right */
}

/* First badge after .search takes the empty space; subsequent badges sit beside it */
.topbar .search ~ .badge { margin-left: auto; }
.topbar .search ~ .badge ~ .badge { margin-left: 0; }
/* Collection/watchlist/tracking/notifications moved into the auth menu, so the
   language switch starts the right-aligned cluster (lang + auth). */
.topbar .search ~ .lang-seg { margin-left: auto; }

.topbar .nav a {
  padding: 7px 13px;
  color: var(--text-2);
  text-decoration: none;
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: -0.005em;
  border-radius: 8px;
  transition: color 200ms var(--ease), background 200ms var(--ease);
}

.topbar .nav a:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.04);
}

.topbar .nav a.active {
  color: var(--cyan);
  background: var(--cyan-soft);
}

.topbar .badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  color: var(--text-1);
  text-decoration: none;
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: -0.005em;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hr);
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}

.topbar .badge:hover {
  border-color: var(--cyan-hairline);
  background: var(--cyan-soft);
}

.topbar .badge .icon { width: 13px; height: 13px; color: var(--cyan); }
.topbar .badge .num { font-family: 'Geist Mono', monospace; font-weight: 600; color: var(--cyan); }
.topbar .badge .num:empty { display: none; }

@media (max-width: 980px) {
  .topbar .nav { display: none; }
  .topbar .search-placeholder { display: none; }
}

@media (max-width: 720px) {
  .topbar { padding: 0 14px; }
  .topbar-inner { gap: 9px; }
  /* Push the logo left and let everything else group tightly on the right —
     more robust than per-item margins fighting the base flex rules. */
  .topbar .brand { font-size: 15px; margin-right: auto; }
  .topbar .search-hint, .topbar .search-placeholder { display: none; }

  /* Primary nav (collection/watchlist/tracking) lives in the bottom nav on
     phones — freed from the topbar so the rest can be comfortable targets. */
  .topbar .badge[data-nav="collection"],
  .topbar .badge[data-nav="watchlist"],
  .topbar .badge[data-nav="tracking"] { display: none; }

  /* Everything after the logo forms one tidy right-aligned cluster. The
     margin-left:auto on search pushes the group right; explicit width overrides
     the base flex:1 that was stretching search into a wide empty bar. */
  .topbar .search {
    flex: 0 0 40px; width: 40px; min-width: 40px; max-width: 40px; height: 40px;
    margin: 0; padding: 0; gap: 0; justify-content: center; align-items: center;
    border-radius: 11px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hr-strong);
  }
  .topbar .search-icon { width: 20px !important; height: 20px !important; color: var(--cyan) !important; flex: none; opacity: 1 !important; display: block !important; }
  .topbar .search-icon circle, .topbar .search-icon path { stroke: var(--cyan); }
  .notif-bell { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px; border-color: var(--hr-strong); }
  .notif-bell svg { width: 18px; height: 18px; }
  .topbar .search:hover, .notif-bell:hover { border-color: var(--cyan-hairline); background: var(--cyan-soft); }

  /* lighter language switcher — the cyan-bordered box read too heavy */
  .lang-seg { margin: 0; gap: 1px; padding: 3px; border-color: var(--hr-strong); background: none; align-self: center; }
  .lang-seg .lang-opt { padding: 6px 7px; }

  /* account: round avatar only (the name eats width and clips on the edge) */
  .topbar .auth-username { display: none; }
  .topbar .auth-btn-user { padding: 0; border: none; background: none; }
  .topbar .auth-avatar { width: 32px; height: 32px; border-radius: 50%; font-size: 13px; }
}

/* ── route-content (rooms) ─────────────────────────────────────── */
#route-content {
  display: none;
  min-height: calc(100vh - var(--topbar-h));
  padding: 28px 24px 80px;
  background: var(--bg-room);
}

body.route-active #route-content { display: block; }
body.route-active main:not(#route-content) { display: none !important; }
body.route-active .chrome { display: none !important; }

/* Hide the old chrome on home as well — the new topbar replaces it */
body .chrome { display: none !important; }
body main:not(#route-content) { padding-top: 0 !important; }

.room {
  max-width: 1280px;
  margin: 0 auto;
}

.room-head {
  margin-bottom: 36px;
  padding: 20px 0 28px;
  border-bottom: 1px solid var(--hr);
}

.room-head .breadcrumb {
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.room-head .breadcrumb a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 160ms var(--ease);
}

.room-head .breadcrumb a:hover { color: var(--cyan); }

.room-head h1 {
  margin: 0;
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: clamp(32px, 4.6vw, 52px);
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--text-1);
}

.room-head .sub {
  margin-top: 12px;
  font-family: 'Geist', sans-serif;
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.55;
  letter-spacing: -0.005em;
  max-width: 640px;
}

.room-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

.room-stats > .room-stat,
.room-stats:not([class*="grid"]) > .room-stat {
  background: var(--bg-elev);
  border: 1px solid var(--hr);
  border-radius: 16px;
  padding: 20px 22px;
  transition: border-color 200ms var(--ease), transform 200ms var(--ease);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
}

.room-stats > .room-stat:hover {
  border-color: var(--cyan-hairline);
  transform: translateY(-1px);
}

.room-stat .lbl {
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.room-stat .v {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 26px;
  color: var(--text-1);
  letter-spacing: -0.025em;
  line-height: 1;
}

.room-stat .v.up    { color: #52E08F; }
.room-stat .v.down  { color: #FF5468; }
.room-stat .v.cyan  { color: var(--cyan); }
.room-stat .v.gold  { color: var(--gold); }

/* Secondary BRL line under a stat value (collection P&L) */
.room-stat .brl {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 6px;
  letter-spacing: -0.01em;
}
.room-stat .brl.up   { color: #52E08F; opacity: .85; }
.room-stat .brl.down { color: #FF5468; opacity: .85; }

/* Collection toolbar: portfolio tabs + export */
.col-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 4px 0 16px;
}
.col-toolbar-sp { flex: 1; }
.col-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.col-tab {
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  background: none;
  border: 1px solid var(--hr-strong);
  border-radius: 8px;
  padding: 6px 13px;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.col-tab:hover { color: var(--text-1); }
.col-tab.on {
  background: var(--cyan-soft);
  border-color: var(--cyan-hairline);
  color: var(--text-1);
}
.col-export {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.col-export .ico { width: 15px; height: 15px; }
.col-export.locked { opacity: .6; }

/* ── Collection table ─────────────────────────────────────────── */
.col-table-wrap { border: 1px solid var(--hr); border-radius: 14px; overflow-x: auto; background: var(--bg-elev); }
.col-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.col-table thead th {
  font-family: 'Geist Mono', monospace; font-weight: 600; font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3);
  text-align: right; padding: 14px 16px; border-bottom: 1px solid var(--hr); white-space: nowrap;
}
.col-table th.l, .col-table td.l { text-align: left; }
.col-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--hr); text-align: right;
  font-family: 'Geist Mono', monospace; color: var(--text-1); white-space: nowrap; vertical-align: middle;
}
.col-table tbody tr:last-child td { border-bottom: 0; }
.col-table .col-row { cursor: pointer; transition: background 140ms var(--ease); }
.col-table .col-row:hover { background: #14171F; }
.col-table td.strong { font-weight: 600; }
.col-table td .up { color: #52E08F; } .col-table td .down { color: #FF5468; } .col-table td .flat { color: var(--text-3); }

.col-table .ccell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.col-table .thumb { width: 34px; height: 47px; border-radius: 4px; overflow: hidden; background: rgba(255,255,255,0.04); flex: none; border: 1px solid var(--hr); }
.col-table .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.col-table .cc-txt { min-width: 0; }
.col-table .cc-name { font-family: 'Geist', sans-serif; font-weight: 600; color: var(--text-1); font-size: 13.5px; display: flex; align-items: center; gap: 7px; }
.col-table .cc-name .qx { color: var(--text-3); font-family: 'Geist Mono', monospace; font-size: 11px; font-weight: 500; }
.col-table .cc-set { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--text-3); margin-top: 2px; letter-spacing: 0.02em; }
.col-table .cc-cost { margin-top: 5px; }
.col-table .rm {
  flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1px solid transparent;
  background: none; color: var(--text-3); cursor: pointer; font-size: 16px; line-height: 1;
  opacity: 0; transition: opacity 140ms var(--ease), color 140ms var(--ease);
}
.col-row:hover .rm, .col-row:focus-within .rm { opacity: 1; }
.col-table .rm:hover { color: #FF5468; border-color: #FF5468; }

/* inline editors (cost + language) — reuse the existing click handlers */
.col-table .cost-cell, .col-table .cc-lang {
  background: none; border: 1px dashed transparent; font-family: 'Geist Mono', monospace;
  font-size: 12px; cursor: pointer; padding: 3px 6px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 5px; color: var(--text-3);
}
.col-table .cost-cell { color: var(--text-1); font-size: 13px; }
.col-table .cost-cell:not(.has) { color: var(--text-3); border-color: var(--hr-strong); }
.col-table .cost-cell:hover, .col-table .cc-lang:hover { color: var(--cyan); border-color: var(--cyan-hairline); }
.col-table .cc-lang .flag { display: inline-flex; width: 16px; height: 12px; border-radius: 2px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10); }
.col-table .cost-form { display: inline-flex; align-items: center; gap: 5px; }
.col-table .cost-form .cur { color: var(--text-3); font-family: 'Geist Mono', monospace; font-size: 12px; }
.col-table .cost-form input { width: 78px; background: var(--bg-room); border: 1px solid var(--cyan-hairline); border-radius: 6px; color: var(--text-1); font-family: 'Geist Mono', monospace; font-size: 12px; padding: 4px 8px; text-align: right; }
.col-table .cost-form input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(93,234,255,0.10); }
/* Drop the default OS number spinner — off-brand and useless for a price field */
.col-table .cost-form input[type="number"]::-webkit-outer-spin-button,
.col-table .cost-form input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.col-table .cost-form input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.col-table .cost-form button { background: none; border: 1px solid var(--hr-strong); border-radius: 6px; color: var(--text-2); font-size: 11px; padding: 4px 8px; cursor: pointer; }
.col-table .cost-form button:hover { background: var(--cyan); color: var(--bg-room); }
.col-table .lang-form select { background: var(--bg-room); border: 1px solid var(--cyan-hairline); border-radius: 6px; color: var(--text-1); font-family: 'Geist Mono', monospace; font-size: 12px; padding: 4px 6px; }

/* ── Collection mobile ────────────────────────────────────────────
   Value-led summary + a condensed table (drop qty/price/ROI columns;
   keep Card | Cost | Value | P&L). Controls always visible (no hover). */
@media (max-width: 640px) {
  #route-content { padding: 18px 14px 64px; }
  .room-head { margin-bottom: 20px; padding: 6px 0 16px; }
  .room-head h1 { font-size: 28px; }
  .room-head .sub { font-size: 13px; margin-top: 8px; }

  .col-stats { grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 18px; }
  .col-stats > .room-stat { padding: 13px 14px; border-radius: 13px; }
  .col-stats > .room-stat:first-child { grid-column: 1 / -1; }
  .col-stats .room-stat .v { font-size: 19px; }
  .col-stats .room-stat:first-child .v { font-size: 30px; }
  .col-stats .room-stat .brl { font-size: 11px; margin-top: 3px; }

  .col-toolbar { gap: 10px; margin-bottom: 12px; }
  .col-tab, .col-export { padding: 8px 13px; }

  /* Mobile table = Card (with cost line) | Value | P&L. Everything else hidden. */
  .col-table thead th, .col-table td { padding: 11px 8px; }
  .col-table .hide-m { display: none; }
  .col-table thead th:first-child, .col-table td:first-child { padding-left: 12px; }
  .col-table thead th:last-child, .col-table td:last-child { padding-right: 12px; }
  .col-table .thumb { width: 30px; height: 41px; }
  .col-table .ccell { gap: 9px; }
  .col-table .cc-name { font-size: 12.5px; }
  .col-table .cc-set { font-size: 10px; }
  .col-table td.num { font-size: 11.5px; }
  .col-table .rm { opacity: 1; width: 18px; }
  .col-table .cost-form input { width: 62px; }
}

/* Section h2 (used in rooms — same accent-line pattern as Analytics) */
.room h2 {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: clamp(18px, 2vw, 22px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 48px 0 18px;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 14px;
}

.room h2::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan) 0%, transparent 100%);
  flex-shrink: 0;
}

/* ── card grid (used by era/rarity/set/watchlist) ──────────────── */
.cardgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
}

/* ── Analytics: market indices block ─────────────────────────────────────── */
.anlx-indices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 36px; }
.anlx-idx { background: var(--bg-elev); border: 1px solid var(--hr); border-radius: 14px; padding: 18px; }
.anlx-idx-head { display: flex; align-items: baseline; gap: 8px; }
.anlx-idx-head .name { font-family: 'Geist', sans-serif; font-weight: 600; font-size: 15px; color: var(--text-1); letter-spacing: -0.012em; }
.anlx-idx-head .code { margin-left: auto; font-family: 'Geist Mono', monospace; font-size: 9px; color: var(--cyan); background: var(--cyan-soft); padding: 2px 6px; border-radius: 3px; letter-spacing: 0.14em; font-weight: 700; }
.anlx-idx-price { font-family: 'Geist', sans-serif; font-size: 24px; font-weight: 600; color: var(--text-1); letter-spacing: -0.02em; margin-top: 8px; font-feature-settings: 'tnum' 1; }
.anlx-idx-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hr); }
.anlx-idx-cell .l { font-family: 'Geist Mono', monospace; font-size: 9px; color: var(--text-3); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 3px; font-weight: 600; }
.anlx-idx-cell .ch { font-family: 'Geist Mono', monospace; font-size: 13px; font-weight: 700; font-feature-settings: 'tnum' 1; }
.anlx-idx-cell .ch.up { color: #52E08F; } .anlx-idx-cell .ch.down { color: #FF5468; } .anlx-idx-cell .ch.flat { color: var(--text-3); }
.anlx-idx-members { font-family: 'Geist Mono', monospace; font-size: 10.5px; color: var(--text-3); margin-top: 12px; }
@media (max-width: 720px) { .anlx-indices { grid-template-columns: 1fr; } }

/* ── /portfolio best & worst mover cards ─────────────────────────────────── */
.pf-movers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 24px; }
.pf-mover { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg-elev); border: 1px solid var(--hr); border-radius: 12px; text-decoration: none; color: inherit; transition: border-color 160ms var(--ease); }
.pf-mover:hover { border-color: var(--cyan-hairline); }
.pf-mover img { width: 38px; height: 53px; object-fit: cover; border-radius: 5px; background: #0A0E1F; flex-shrink: 0; }
.pf-mover-txt { min-width: 0; flex: 1; }
.pf-mover-k { font-family: 'Geist Mono', monospace; font-size: 9px; font-weight: 700; letter-spacing: 0.14em; color: var(--text-3); }
.pf-mover-n { font-family: 'Geist', sans-serif; font-weight: 600; font-size: 14px; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.pf-mover-c { font-family: 'Geist Mono', monospace; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.pf-mover-c.up { color: #52E08F; } .pf-mover-c.down { color: #FF5468; } .pf-mover-c.flat { color: var(--text-3); }
@media (max-width: 640px) { .pf-movers { grid-template-columns: 1fr; } }

/* portfolio dashboard sections (chart + allocation) */
.pf-section { background: var(--bg-elev); border: 1px solid var(--hr); border-radius: 14px; padding: 18px 20px; margin-bottom: 24px; }
.pf-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pf-section-t { font-family: 'Geist', sans-serif; font-weight: 600; font-size: 14px; color: var(--text-1); }
.pf-rngs { margin-left: auto; display: inline-flex; gap: 4px; background: rgba(255,255,255,0.03); border: 1px solid var(--hr); border-radius: 8px; padding: 3px; }
.pf-rng { font-family: 'Geist Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: var(--text-3); background: none; border: 0; padding: 4px 9px; border-radius: 6px; cursor: pointer; }
.pf-rng:hover { color: var(--text-1); }
.pf-rng.on { color: var(--bg-room, #0A0E1F); background: var(--cyan); }
.pf-chart { position: relative; cursor: crosshair; }
.pf-chart svg { display: block; width: 100%; height: 150px; }
.pf-alloc { display: flex; flex-direction: column; gap: 9px; margin-top: 6px; }
.pf-alloc-row { display: flex; align-items: center; gap: 12px; }
.pf-alloc-name { font-family: 'Geist Mono', monospace; font-size: 11.5px; color: var(--text-2, #c9cdd6); width: 150px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-alloc-bar { flex: 1; height: 8px; background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden; }
.pf-alloc-bar > div { height: 100%; background: linear-gradient(90deg, var(--cyan-deep, #00C4DE), var(--cyan)); border-radius: 4px; }
.pf-alloc-pct { font-family: 'Geist Mono', monospace; font-size: 11.5px; font-weight: 700; color: var(--text-1); width: 48px; text-align: right; flex-shrink: 0; }
@media (max-width: 540px) { .pf-alloc-name { width: 96px; } }

/* ── /sets leaderboard table ─────────────────────────────────────────────── */
.sets-table { width: 100%; border-collapse: collapse; font-family: 'Geist Mono', monospace; font-size: 13px; }
.sets-table thead th {
  text-align: left; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-3); font-weight: 700; padding: 11px 12px; border-bottom: 1px solid var(--hr);
  white-space: nowrap; position: sticky; top: var(--topbar-h); background: var(--bg);
}
.sets-table th.r, .sets-table td.r { text-align: right; }
.sets-table th.sortable { cursor: pointer; user-select: none; }
.sets-table th.sortable:hover { color: var(--text-1); }
.sets-table th.sorted { color: var(--cyan); }
.sets-table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--hr); white-space: nowrap; vertical-align: middle; }
.sets-table tbody tr { cursor: pointer; transition: background 150ms var(--ease); }
.sets-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.sets-table .rank { color: var(--text-3); font-feature-settings: 'tnum' 1; }
.sets-table .px { color: var(--cyan); font-weight: 600; }
.sets-table .up { color: #52E08F; } .sets-table .down { color: #FF5468; } .sets-table .flat { color: var(--text-3); }
.set-cell { display: flex; align-items: center; gap: 10px; }
.set-cell img { width: 32px; height: 44px; object-fit: cover; border-radius: 4px; background: var(--bg-elev); flex-shrink: 0; }
.set-cell .nm { font-family: 'Geist', sans-serif; font-weight: 600; font-size: 13px; color: var(--text-1); }
.set-cell .sub { font-size: 10.5px; color: var(--text-3); margin-top: 2px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.sets-search {
  width: 100%; max-width: 320px; padding: 9px 13px; border-radius: 9px;
  background: var(--bg-elev); border: 1px solid var(--hr); color: var(--text-1);
  font-family: 'Geist', sans-serif; font-size: 13px; outline: none;
}
.sets-search:focus { border-color: var(--cyan-hairline); }
@media (max-width: 720px) {
  .sets-table { font-size: 11.5px; }
  .sets-table .set-cell .sub { display: none; }
}

.cardgrid .card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--hr);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 240ms var(--ease), transform 240ms var(--ease), background 240ms var(--ease), box-shadow 240ms var(--ease);
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
}

.cardgrid .card:hover {
  border-color: var(--cyan-hairline);
  transform: translateY(-3px);
  background: #14171F;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 18px 36px -16px rgba(0,0,0,0.6);
}

.cardgrid .card .img {
  aspect-ratio: 5 / 7;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 14px;
  box-shadow: 0 8px 16px -8px rgba(0,0,0,0.4);
}

.cardgrid .card .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cardgrid .card .name {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-1);
  margin-bottom: 4px;
  letter-spacing: -0.015em;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  /* Always reserve two lines so the meta + price below stay aligned across
     cards whether the name wraps to one line or two. */
  min-height: 2.6em;
}

.cardgrid .card .meta {
  font-family: 'Geist Mono', monospace;
  font-weight: 400;
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cardgrid .card .price {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--cyan);
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.cardgrid .card .price .chg {
  font-size: 11.5px;
  font-weight: 500;
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0;
}

.cardgrid .card .price .chg.up   { color: #52E08F; }
.cardgrid .card .price .chg.down { color: #FF5468; }
.cardgrid .card .price .chg.flat { color: var(--text-3); }

/* Collection — server-backed portfolio vitrine */
.col-hint {
  margin: 0 0 18px; padding: 10px 14px;
  font-size: 12px; line-height: 1.5; color: var(--text-3);
  border: 1px dashed var(--hr); border-radius: 8px;
}

/* Logged-in home strip — collection value glance */
.home-collection-strip { margin: 0 0 6px; }
.home-collection-strip[hidden] { display: none; }
.home-collection-strip .hcs {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px;
  border: 1px solid var(--hr); border-radius: 10px;
  background: linear-gradient(180deg, rgba(93,234,255,0.05), rgba(93,234,255,0.015));
  text-decoration: none;
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}
.home-collection-strip .hcs:hover { border-color: var(--cyan-hairline); background: rgba(93,234,255,0.07); }
.home-collection-strip .hcs-k { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.home-collection-strip .hcs-k .icon { width: 15px; height: 15px; color: var(--cyan); }
.home-collection-strip .hcs-v { font-family: 'Geist Mono', monospace; font-weight: 600; font-size: 15px; color: var(--text-1); }
.home-collection-strip .hcs-c { font-family: 'Geist Mono', monospace; font-size: 12.5px; }
.home-collection-strip .hcs-c.up { color: #52E08F; }
.home-collection-strip .hcs-c.down { color: #FF5468; }
.home-collection-strip .hcs-c.flat { color: var(--text-3); }
.home-collection-strip .hcs-go { margin-left: auto; color: var(--text-3); font-size: 16px; transition: transform 180ms var(--ease), color 180ms var(--ease); }
.home-collection-strip .hcs:hover .hcs-go { color: var(--cyan); transform: translateX(2px); }


/* switcher de idioma da UI (topbar) */
.lang-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg-elev); border: 1px solid var(--cyan-hairline); border-radius: 8px; margin-right: 10px; }
.lang-seg .lang-opt { background: none; border: 1px solid transparent; border-radius: 5px; padding: 3px 6px; cursor: pointer; opacity: .45; transition: opacity 140ms var(--ease), border-color 140ms var(--ease); display: inline-flex; }
.lang-seg .lang-opt:hover { opacity: 1; }
.lang-seg .lang-opt.is-active { opacity: 1; border-color: var(--cyan); }
.lang-seg .flag { display: inline-flex; width: 16px; height: 12px; border-radius: 2px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10); }
.lang-seg .flag svg { width: 100%; height: 100%; display: block; }

.cardgrid .card .actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 160ms var(--ease);
}

.cardgrid .card:hover .actions,
.cardgrid .card:focus-within .actions { opacity: 1; }

.action-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--hr-strong);
  border-radius: 7px;
  color: var(--text-2);
  cursor: pointer;
  transition: color 160ms var(--ease), border-color 160ms var(--ease), background 160ms var(--ease);
}

.action-btn:hover {
  color: var(--cyan);
  border-color: var(--cyan-hairline);
  background: rgba(0, 0, 0, 0.85);
}

.action-btn.active {
  color: var(--cyan);
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.action-btn svg { width: 14px; height: 14px; }

/* ── filter chips ──────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 18px 20px;
  background: var(--bg-elev);
  border: 1px solid var(--hr);
  border-radius: 16px;
  align-items: center;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
}

.filter-bar .group-lbl {
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-right: 8px;
  padding-right: 12px;
  border-right: 1px solid var(--hr);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 13px;
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: -0.005em;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--hr-strong);
  border-radius: 99px;
  cursor: pointer;
  transition: color 200ms var(--ease), border-color 200ms var(--ease), background 200ms var(--ease), transform 200ms var(--ease);
  text-decoration: none;
}

.chip:hover {
  color: var(--text-1);
  border-color: var(--cyan-hairline);
  transform: translateY(-1px);
}

.chip.active {
  color: var(--cyan);
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

/* ── Today section (Card of the Day) ──────────────────────────── */
.today-grid {
  margin-bottom: 28px;
}

.today-card {
  background: var(--bg-elev);
  border: 1px solid var(--hr);
  border-radius: 14px;
  padding: 22px;
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 22px;
  cursor: pointer;
  transition: border-color 200ms var(--ease);
  text-decoration: none;
  color: inherit;
}

.today-card:hover { border-color: var(--cyan-hairline); }

@media (max-width: 540px) {
  .today-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
  }
  .today-card .art {
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
  }
}

.today-card .art {
  position: relative;
  aspect-ratio: 5 / 7;
}

.today-card .art .frame {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.today-card .art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.08);
}

.today-card .art .stars {
  position: absolute;
  top: -10px; right: -14px;
  width: 52px; height: 60px;
  pointer-events: none;
  z-index: 3;
}

.today-card .art .stars svg {
  position: absolute;
  color: var(--yellow, #F4D35E);
  opacity: 0;
  transform-origin: center;
  animation: spot-twinkle 3.4s linear infinite;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.today-card .art .stars svg:nth-child(1) {
  width: 20px; height: 20px;
  top: 0; right: 4px;
  animation-delay: 0s;
}

.today-card .art .stars svg:nth-child(2) {
  width: 12px; height: 12px;
  top: 22px; right: 0;
  animation-delay: 0.85s;
  color: var(--cyan);
}

.today-card .art .stars svg:nth-child(3) {
  width: 8px; height: 8px;
  top: 38px; right: 20px;
  animation-delay: 1.65s;
}

@media (prefers-reduced-motion: reduce) {
  .today-card .art .stars svg { animation: none; opacity: 0.85; transform: scale(0.9); }
}

.today-card .body .lbl {
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.10em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.today-card .body h3 {
  margin: 0 0 4px;
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--text-1);
  line-height: 1.15;
}

.today-card .body .submeta {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.today-card .priceline {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
}

.today-card .priceline .px {
  font-family: 'Geist Mono', monospace;
  font-weight: 700;
  font-size: 28px;
  color: var(--text-1);
  letter-spacing: -0.01em;
}

.today-card .priceline .chg {
  font-family: 'Geist Mono', monospace;
  font-weight: 600;
  font-size: 14px;
}

.today-card .priceline .chg.up { color: #52E08F; }
.today-card .priceline .chg.down { color: #FF5468; }

.today-card .why {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  border-top: 1px solid var(--hr);
  padding-top: 12px;
}

/* ── Today signals · chip row replacement for flat .why microline ──
   Each chip is a discrete read-in-300ms token. Geometric glyphs only
   (★ ▲ ▼ ×), no emoji. Soft-tinted backgrounds tied to semantic role.
   Layout: wraps freely; no fixed widths; gap is the rhythm. */
.today-card .signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--hr);
  padding-top: 14px;
  margin-top: 4px;
}
.today-card .signals:empty { display: none; }

/* ── Card-of-day · Proposta 2 layout (left = art + signal badges, right = info) ── */
.today-card .cod-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.today-card .cod-left .art { width: 100%; display: block; }
.today-card .info { display: flex; flex-direction: column; min-width: 0; }
.today-card .cod-tag { align-self: flex-start; font-family: 'Geist Mono', monospace; font-size: 9.5px; font-weight: 700; letter-spacing: 0.16em; color: #F4D35E; background: rgba(244,211,94,0.12); padding: 4px 9px; border-radius: 4px; }
.today-card .cod-nm { font-family: 'Geist', sans-serif; font-weight: 600; font-size: 26px; line-height: 1.1; letter-spacing: -0.02em; color: var(--text-1); margin-top: 12px; text-decoration: none; }
.today-card .cod-nm:hover { color: var(--cyan); }
.today-card .cod-meta { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--text-3); margin-top: 5px; }
.today-card .cod-price { display: flex; align-items: baseline; gap: 12px; margin-top: 14px; }
.today-card .cod-price .px { font-family: 'Geist', sans-serif; font-weight: 600; font-size: 32px; color: #F4D35E; letter-spacing: -0.02em; }
.today-card .cod-price .chg { font-family: 'Geist Mono', monospace; font-weight: 700; font-size: 18px; }
.today-card .cod-price .chg.up { color: #52E08F; } .today-card .cod-price .chg.down { color: #FF5468; } .today-card .cod-price .chg.flat { color: var(--text-3); }
.today-card .cod-chart { margin-top: 14px; position: relative; cursor: crosshair; }
.today-card .cod-chart svg { display: block; width: 100%; height: 64px; }
.today-card .cod-chart:empty { display: none; }
.ms-hover { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.12s var(--ease); }
.ms-hover.on { opacity: 1; }
.ms-vline { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,0.22); transform: translateX(-0.5px); }
.ms-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #5DEAFF; box-shadow: 0 0 8px #5DEAFF; transform: translate(-50%, -50%); }
.ms-tip { position: absolute; top: -6px; transform: translate(-50%, -100%); display: flex; flex-direction: column; gap: 1px; padding: 5px 9px; white-space: nowrap; background: var(--bg-elev); border: 1px solid var(--hr); border-radius: 7px; box-shadow: var(--shadow-card); }
.ms-tip .ms-px { font-family: 'Geist', sans-serif; font-weight: 700; font-size: 13px; color: var(--text-1); }
.ms-tip .ms-meta { font-family: 'Geist Mono', monospace; font-size: 9.5px; color: var(--text-3); }

/* signals under the image — CARDESK terminal style: a mini-card sigil marker in
   the signal's accent colour + mono uppercase readout, no heavy box. */
.today-card .cod-left .signals { flex-direction: column; align-items: flex-start; gap: 7px; border-top: 0; padding-top: 2px; margin-top: 0; }
.today-card .cod-left .signal-chip {
  width: auto; justify-content: flex-start; background: none; border: 0; padding: 0; border-radius: 0;
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; gap: 9px;
}
.today-card .cod-left .signal-chip .ico { display: none; }
.today-card .cod-left .signal-chip::before {
  content: ""; flex: none; width: 8px; height: 11px; border-radius: 2px;
  background: currentColor; box-shadow: 0 0 7px currentColor; opacity: 0.92;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

/* graded premiums marquee inside the card-of-day */
.today-card .cod-graded { margin-top: 22px; }
.today-card .cg-head { display: flex; align-items: center; gap: 8px; font-family: 'Geist Mono', monospace; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.today-card .cg-head .cg-all { margin-left: auto; font-size: 10px; color: var(--cyan); text-decoration: none; letter-spacing: 0.04em; text-transform: none; font-weight: 600; border: 1px solid var(--cyan-deep); background: var(--cyan-soft); padding: 3px 9px; border-radius: 99px; }
.today-card .cg-marquee { overflow: hidden; margin-top: 10px; -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.today-card .cg-track { display: flex; gap: 10px; width: max-content; animation: cg-scroll 24s linear infinite; }
.today-card .cg-marquee:hover .cg-track { animation-play-state: paused; }
.today-card .cg-item { display: flex; align-items: center; gap: 9px; background: var(--bg-elev); border: 1px solid var(--hr); border-radius: 8px; padding: 7px 10px; flex-shrink: 0; text-decoration: none; color: inherit; }
.today-card .cg-item:hover { border-color: var(--cyan-hairline); }
.today-card .cg-item img { width: 30px; height: 42px; object-fit: cover; border-radius: 4px; background: #0A0E1F; flex-shrink: 0; }
.today-card .cg-item .ci-nm { font-family: 'Geist', sans-serif; font-weight: 600; font-size: 12px; white-space: nowrap; color: var(--text-1); }
.today-card .cg-item .ci-g { font-family: 'Geist Mono', monospace; font-size: 9px; color: var(--text-3); letter-spacing: 0.08em; margin-top: 2px; }
.today-card .cg-item .ci-x { font-family: 'Geist', sans-serif; font-weight: 700; font-size: 16px; color: var(--cyan); margin-left: 6px; letter-spacing: -0.02em; }
@keyframes cg-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .today-card .cg-track { animation: none; } }

.signal-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  border: 1px solid;
  font-feature-settings: 'tnum' 1;
  white-space: nowrap;
}
.signal-chip .ico {
  font-size: 9.5px;
  line-height: 1;
  opacity: 0.95;
  font-weight: 400;
}
.signal-chip.signal-ath {
  color: #F4D35E;
  background: rgba(244, 211, 94, 0.10);
  border-color: rgba(244, 211, 94, 0.34);
}
.signal-chip.signal-atl {
  color: #FF5468;
  background: rgba(255, 84, 104, 0.10);
  border-color: rgba(255, 84, 104, 0.34);
}
.signal-chip.signal-up {
  color: #52E08F;
  background: rgba(82, 224, 143, 0.10);
  border-color: rgba(82, 224, 143, 0.32);
}
.signal-chip.signal-down {
  color: #FF5468;
  background: rgba(255, 84, 104, 0.10);
  border-color: rgba(255, 84, 104, 0.32);
}
.signal-chip.signal-vol {
  color: #5DEAFF;
  background: rgba(93, 234, 255, 0.10);
  border-color: rgba(0, 196, 222, 0.55);
}
.signal-chip.signal-mult {
  color: #A78BFA;
  background: rgba(167, 139, 250, 0.10);
  border-color: rgba(167, 139, 250, 0.38);
}
.signal-chip.signal-fact {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.025);
  border-color: var(--hr);
}

/* ── Empty states (watchlist, tracking) ────────────────────────── */
.empty-room {
  max-width: 540px;
  margin: 96px auto;
  text-align: center;
  padding: 56px 36px;
  background:
    radial-gradient(ellipse at 50% 25%, rgba(93, 234, 255, 0.06), transparent 65%),
    var(--bg-elev);
  border: 1px solid var(--hr);
  border-radius: 24px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
}

.empty-room .icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 28px;
  color: var(--cyan);
  opacity: 0.6;
}

.empty-room h2 {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.025em;
  color: var(--text-1);
  margin: 0 0 14px;
  line-height: 1.15;
}

.empty-room p {
  font-family: 'Geist', sans-serif;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 32px;
  letter-spacing: -0.005em;
}

.empty-room .ctas {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  font-family: 'Geist', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hr-strong);
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 200ms var(--ease), background 200ms var(--ease), transform 80ms var(--ease);
}

.btn:hover { border-color: var(--cyan-hairline); background: rgba(255, 255, 255, 0.08); }
.btn:active { transform: scale(0.98); }

.btn.primary {
  color: #001018;
  background: var(--cyan);
  border-color: var(--cyan);
  font-weight: 600;
  box-shadow: 0 0 24px -8px rgba(93, 234, 255, 0.5);
}

.btn.primary:hover {
  background: #7DEFFF;
  border-color: #7DEFFF;
  box-shadow: 0 0 32px -6px rgba(93, 234, 255, 0.7);
}

.btn.ghost { background: transparent; }

.btn .kbd {
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  padding: 2px 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--hr);
  border-radius: 4px;
  color: var(--text-2);
  margin-left: 4px;
}

/* ── Card detail page ──────────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 36px;
  align-items: start;
  margin-bottom: 32px;
}

@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; gap: 22px; }
}

.detail-art {
  aspect-ratio: 5 / 7;
  background: var(--bg-elev);
  border: 1px solid var(--hr);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 22px 48px -16px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.detail-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(255,255,255,0.02);
}

.detail-info h1 {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: clamp(32px, 4.4vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.04;
  margin: 0 0 10px;
  color: var(--text-1);
}

.detail-info .submeta {
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  color: var(--text-2);
  letter-spacing: -0.005em;
  margin-bottom: 28px;
}

.detail-info .submeta a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid var(--cyan-hairline);
  padding-bottom: 1px;
}

.detail-info .submeta a:hover { border-bottom-color: var(--cyan); }

.detail-info .priceline {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.detail-info .px {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 44px);
  color: var(--text-1);
  letter-spacing: -0.03em;
  line-height: 1;
}

.detail-info .chg {
  font-family: 'Geist Mono', monospace;
  font-weight: 600;
  font-size: 16px;
}

.detail-info .chg.up { color: #52E08F; }
.detail-info .chg.down { color: #FF5468; }

.detail-info .ath {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

.detail-info .ath b { color: var(--text-2); font-weight: 500; }

.detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.detail-table {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 18px 22px;
  background: var(--bg-elev);
  border: 1px solid var(--hr);
  border-radius: 12px;
  margin-top: 24px;
}

@media (max-width: 720px) {
  .detail-table { grid-template-columns: 1fr; }
}

.detail-table .col h4 {
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.10em;
  color: var(--text-3);
  text-transform: uppercase;
  margin: 0 0 10px;
  font-weight: 500;
}

.detail-table .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--hr);
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
}

.detail-table .row:last-child { border-bottom: none; }
.detail-table .row .k { color: var(--text-3); }
.detail-table .row .v { color: var(--text-1); font-weight: 600; }

/* ── Set tracker grid ──────────────────────────────────────────── */
.tracker-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}

@media (max-width: 720px) {
  .tracker-summary { grid-template-columns: 1fr; }
}

.tracker-summary .stat {
  background: var(--bg-elev);
  border: 1px solid var(--hr);
  border-radius: 16px;
  padding: 20px 22px;
  transition: border-color 200ms var(--ease), transform 200ms var(--ease);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
}

.tracker-summary .stat:hover {
  border-color: var(--cyan-hairline);
  transform: translateY(-1px);
}

.tracker-summary .stat .lbl {
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.tracker-summary .stat .v {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 28px;
  color: var(--text-1);
  letter-spacing: -0.025em;
  line-height: 1;
}

.tracker-summary .stat .sub {
  font-family: 'Geist', sans-serif;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 8px;
  line-height: 1.4;
}

.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 99px;
  overflow: hidden;
  margin: 12px 0 32px;
  position: relative;
}

.progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), #7CD6FF);
  border-radius: 99px;
  transition: width 480ms var(--ease);
  box-shadow: 0 0 12px rgba(93, 234, 255, 0.4);
}

.tracker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.tracker-cell {
  position: relative;
  aspect-ratio: 5 / 7;
  background: var(--bg-elev);
  border: 1px solid var(--hr);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 200ms var(--ease), transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.tracker-cell:hover {
  border-color: var(--cyan-hairline);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -8px rgba(0,0,0,0.5);
}

.tracker-cell.owned {
  border-color: var(--cyan-hairline);
  box-shadow: 0 0 0 1px var(--cyan-hairline) inset, 0 0 18px -6px rgba(93, 234, 255, 0.3);
}

.tracker-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.85) brightness(0.55);
  transition: filter 200ms var(--ease);
}

.tracker-cell.owned img { filter: none; }

.tracker-cell .check {
  position: absolute;
  top: 4px; right: 4px;
  width: 18px; height: 18px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--hr-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}

.tracker-cell.owned .check {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #001018;
}

.tracker-cell .check svg { width: 11px; height: 11px; }

.tracker-cell .num {
  position: absolute;
  bottom: 4px;
  left: 4px;
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  color: var(--text-1);
  background: rgba(0, 0, 0, 0.7);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

/* ── Watchlist table ───────────────────────────────────────────── */
.wl-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-elev);
  border: 1px solid var(--hr);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
}

.wl-table th, .wl-table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--hr);
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  vertical-align: middle;
}

.wl-table th {
  background: rgba(255, 255, 255, 0.015);
  color: var(--text-3);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  font-family: 'Geist Mono', monospace;
}

.wl-table tbody tr {
  transition: background 200ms var(--ease);
  cursor: pointer;
}

.wl-table tbody tr:hover { background: rgba(93, 234, 255, 0.04); }
.wl-table tbody tr:last-child td { border-bottom: none; }

.wl-table .img {
  width: 44px;
  height: 61px;
  border-radius: 7px;
  object-fit: cover;
  display: block;
  box-shadow: 0 4px 10px -4px rgba(0,0,0,0.5);
}

.wl-table .name {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-1);
  letter-spacing: -0.015em;
}

.wl-table .name .sub {
  display: block;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
  letter-spacing: 0.04em;
  font-weight: 400;
}

.wl-table .right { text-align: right; }
.wl-table .up { color: #52E08F; }
.wl-table .down { color: #FF5468; }
.wl-table .flat { color: var(--text-3); }

.wl-table .px {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-1);
  letter-spacing: -0.015em;
}

/* Mobile watchlist table — hide # and ATH columns, condense */
@media (max-width: 640px) {
  .wl-table th, .wl-table td { padding: 12px 10px; font-size: 12px; }
  .wl-table th:first-child, .wl-table td:first-child { display: none; }   /* hide # rank column */
  .wl-table th:nth-child(6), .wl-table td:nth-child(6) { display: none; } /* hide ATH column */
  .wl-table .img { width: 40px; height: 56px; }
  .wl-table .name { font-size: 13px; line-height: 1.3; }
  .wl-table .name .sub { font-size: 10.5px; }
  .wl-table .px { font-size: 13px; }
  .wl-table .remove-btn { width: 24px; height: 24px; }
}

.wl-table .remove-btn {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--hr); border-radius: 5px;
  background: transparent; color: var(--text-3);
  cursor: pointer;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}

.wl-table .remove-btn:hover { color: #FF5468; border-color: rgba(255, 84, 104, 0.4); }

/* ── Cmd+K palette ─────────────────────────────────────────────── */
.cmdk-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 9, 13, 0.78);
  backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}

.cmdk-overlay.open { display: flex; animation: fadein 160ms var(--ease); }

@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.cmdk-panel {
  width: 660px;
  max-width: calc(100vw - 32px);
  background: #0F1118;
  border: 1px solid var(--hr-strong);
  border-radius: 18px;
  box-shadow:
    0 32px 72px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255,255,255,0.03) inset;
  overflow: hidden;
}

.cmdk-input-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--hr);
}

.cmdk-input-wrap svg { width: 17px; height: 17px; color: var(--text-3); flex-shrink: 0; }

.cmdk-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 17px;
  color: var(--text-1);
  letter-spacing: -0.015em;
}

.cmdk-input::placeholder { color: var(--text-3); font-weight: 400; }

.cmdk-list {
  max-height: 440px;
  overflow-y: auto;
  padding: 8px;
}

.cmdk-group {
  padding: 12px 14px 6px;
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--text-3);
  text-transform: uppercase;
}

.cmdk-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 120ms var(--ease);
  text-decoration: none;
  color: inherit;
}

.cmdk-item.active { background: rgba(93, 234, 255, 0.10); }
.cmdk-item:hover { background: rgba(255, 255, 255, 0.04); }

.cmdk-item .img {
  width: 28px; height: 39px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
}

.cmdk-item .text { flex: 1; min-width: 0; }
.cmdk-item .text .n {
  font-size: 13.5px;
  color: var(--text-1);
  font-weight: 500;
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmdk-item .text .m {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.cmdk-item .px {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--cyan);
  font-weight: 600;
  flex-shrink: 0;
}

.cmdk-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.04em;
}

.cmdk-loading {
  padding: 22px 16px;
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.06em;
}

.cmdk-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid var(--hr);
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 0.06em;
}

.cmdk-footer .keys { display: flex; gap: 12px; }
.cmdk-footer .keys span { display: inline-flex; align-items: center; gap: 4px; }

/* ── Compare tray ──────────────────────────────────────────────── */
.compare-tray {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  width: 280px;
  background: var(--bg-elev);
  border: 1px solid var(--hr-strong);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  display: none;
}

.compare-tray.open { display: block; animation: slideUp 200ms var(--ease); }

@keyframes slideUp {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.compare-tray .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hr);
}

.compare-tray .head .lbl {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--cyan);
  text-transform: uppercase;
}

.compare-tray .head button {
  background: none; border: none;
  color: var(--text-3); cursor: pointer;
  font-size: 16px; line-height: 1;
}

.compare-tray .items { padding: 10px 12px; }

.compare-tray .item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}

.compare-tray .item .thumb {
  width: 28px; height: 39px;
  border-radius: 4px;
  object-fit: cover;
}

.compare-tray .item .n {
  flex: 1;
  font-size: 12px;
  color: var(--text-1);
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-tray .item .x {
  background: none; border: none;
  color: var(--text-3); cursor: pointer; font-size: 13px;
}

.compare-tray .actions {
  padding: 10px 12px;
  border-top: 1px solid var(--hr);
  display: flex;
  gap: 8px;
}

.compare-tray .actions .btn { flex: 1; height: 32px; font-size: 11.5px; }

/* ── Toast stack ───────────────────────────────────────────────── */
.toasts {
  position: fixed;
  top: calc(var(--topbar-h) + 12px);
  right: 16px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  max-width: 320px;
  padding: 10px 14px;
  background: #0F1117;
  border: 1px solid var(--hr-strong);
  border-radius: 9px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  animation: toastIn 200ms var(--ease);
}

@keyframes toastIn {
  from { transform: translateX(8px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast .icon { width: 14px; height: 14px; color: var(--cyan); flex-shrink: 0; }
.toast .num {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-3);
  margin-left: 4px;
}

/* ── Compare modal ─────────────────────────────────────────────── */
.compare-modal-bd {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vh 4vw;
}

.compare-modal-bd.open { display: flex; animation: fadein 160ms var(--ease); }

.compare-modal {
  background: #0E1018;
  border: 1px solid var(--hr-strong);
  border-radius: 14px;
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  overflow-y: auto;
}

.compare-modal .head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--hr);
}

.compare-modal .head h3 {
  margin: 0; font-family: 'Geist', sans-serif; font-weight: 600; font-size: 16px;
  letter-spacing: -0.01em; color: var(--text-1);
}

.compare-modal .head .x {
  background: none; border: none; color: var(--text-2); font-size: 22px; cursor: pointer;
}

.compare-cols {
  display: grid; gap: 18px;
  padding: 22px;
}

.compare-col {
  background: var(--bg-elev);
  border: 1px solid var(--hr);
  border-radius: 10px;
  padding: 16px;
}

.compare-col .art {
  aspect-ratio: 5/7; border-radius: 8px; overflow: hidden;
  background: rgba(255,255,255,0.03); margin-bottom: 12px;
}

.compare-col .art img { width: 100%; height: 100%; object-fit: cover; }

.compare-col .name {
  font-family: 'Geist', sans-serif; font-weight: 600; font-size: 14px;
  color: var(--text-1); letter-spacing: -0.01em; margin-bottom: 4px;
}

.compare-col .meta {
  font-family: 'Geist Mono', monospace; font-size: 11px;
  color: var(--text-3); margin-bottom: 14px;
}

.compare-col .px {
  font-family: 'Geist Mono', monospace; font-weight: 700; font-size: 22px;
  color: var(--cyan); letter-spacing: -0.01em; margin-bottom: 4px;
}

.compare-col .row {
  display: flex; justify-content: space-between;
  padding: 5px 0; font-family: 'Geist Mono', monospace; font-size: 11px;
  border-bottom: 1px solid var(--hr);
}

.compare-col .row:last-child { border: none; }
.compare-col .row .k { color: var(--text-3); }
.compare-col .row .v { color: var(--text-1); font-weight: 600; }

/* ── Analytics room ─────────────────────────────────────────── */

/* Hero — title + featured card art */
.anlx-hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 32px 0 64px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--hr);
}

@media (max-width: 860px) {
  .anlx-hero { grid-template-columns: 1fr; gap: 36px; padding: 24px 0 48px; }
}

.anlx-hero-left .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid var(--cyan-hairline);
  border-radius: 99px;
  margin-bottom: 18px;
}

.anlx-hero-left .eyebrow::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan);
}

.anlx-hero-left h1 {
  margin: 0 0 18px;
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--text-1);
}

.anlx-hero-left .breadcrumb {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.anlx-hero-left .breadcrumb a {
  color: var(--text-2);
  text-decoration: none;
}

.anlx-hero-left .breadcrumb a:hover { color: var(--cyan); }

.anlx-hero-left .sub {
  font-family: 'Geist', sans-serif;
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.62;
  margin-bottom: 28px;
  max-width: 560px;
}

.anlx-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.anlx-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: -0.005em;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--hr-strong);
  border-radius: 99px;
  text-decoration: none;
  transition: color 200ms var(--ease), border-color 200ms var(--ease), background 200ms var(--ease), transform 200ms var(--ease);
}

.anlx-pill:hover {
  color: var(--text-1);
  border-color: var(--cyan-hairline);
  background: var(--cyan-soft);
  transform: translateY(-1px);
}

.anlx-hero-art {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 36px 32px 32px;
  background:
    radial-gradient(ellipse at 50% 25%, rgba(93, 234, 255, 0.10), transparent 65%),
    linear-gradient(180deg, rgba(255,255,255,0.015) 0%, transparent 100%);
  border: 1px solid var(--hr);
  border-radius: 24px;
  text-decoration: none;
  color: inherit;
  transition: border-color 280ms var(--ease), transform 280ms var(--ease), box-shadow 280ms var(--ease);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 24px 56px -24px rgba(0,0,0,0.5);
}

.anlx-hero-art:hover {
  border-color: var(--cyan-hairline);
  transform: translateY(-3px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 32px 72px -24px rgba(0,0,0,0.65);
}

.anlx-hero-art-wrap {
  width: 260px;
  aspect-ratio: 5 / 7;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 60px rgba(93, 234, 255, 0.08);
}

.anlx-hero-art-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.anlx-hero-caption {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.anlx-hero-caption .lbl {
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--cyan);
  margin-bottom: 4px;
}

.anlx-hero-caption .name {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--text-1);
  letter-spacing: -0.02em;
}

.anlx-hero-caption .sub {
  font-family: 'Geist', sans-serif;
  font-size: 12.5px;
  color: var(--text-3);
  letter-spacing: -0.005em;
}

.anlx-hero-caption .flow {
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  font-size: 13.5px;
  color: var(--cyan);
  letter-spacing: -0.005em;
  margin-top: 4px;
}

/* Did-you-know fact strip */
.anlx-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 64px;
}

@media (max-width: 860px) {
  .anlx-facts { grid-template-columns: 1fr; }
}

.anlx-fact {
  background: var(--bg-elev);
  border: 1px solid var(--hr);
  border-radius: 16px;
  padding: 22px 24px;
  transition: border-color 200ms var(--ease), transform 200ms var(--ease);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
}

.anlx-fact:hover {
  border-color: var(--cyan-hairline);
  transform: translateY(-2px);
}

.anlx-fact .lbl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.anlx-fact .lbl::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(93, 234, 255, 0.7);
}

.anlx-fact .body {
  font-family: 'Geist', sans-serif;
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.6;
  letter-spacing: -0.005em;
}

.anlx-fact .body b {
  color: var(--text-1);
  font-weight: 600;
}

/* Records (well-documented public sales) */
.anlx-records {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 720px) {
  .anlx-records { grid-template-columns: 1fr; }
}

.anlx-record {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  background:
    linear-gradient(180deg, rgba(93, 234, 255, 0.04) 0%, transparent 70%),
    var(--bg-elev);
  border: 1px solid var(--hr);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 200ms var(--ease), transform 200ms var(--ease);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
}

.anlx-record:hover {
  border-color: var(--cyan-hairline);
  transform: translateY(-2px);
}

.anlx-record::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--cyan) 0%, transparent 100%);
}

.anlx-record:first-child::before {
  background: linear-gradient(180deg, #FFD466 0%, #F59E0B 60%, transparent 100%);
}

.anlx-record .rank {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 32px;
  color: var(--cyan);
  letter-spacing: -0.04em;
  line-height: 1;
}

.anlx-record:first-child .rank {
  color: #FFD466;
  text-shadow: 0 0 24px rgba(255, 212, 102, 0.3);
}

.anlx-record .meta .card-name {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-1);
  letter-spacing: -0.015em;
  margin-bottom: 4px;
}

.anlx-record .meta .grade {
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.anlx-record .price {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--cyan);
  letter-spacing: -0.02em;
  text-align: right;
  line-height: 1;
}

.anlx-record:first-child .price {
  color: #FFD466;
}

.anlx-record .venue {
  grid-column: 1 / -1;
  font-family: 'Geist Mono', monospace;
  font-weight: 400;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--hr);
}

.anlx-record-note {
  grid-column: 1 / -1;
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  color: var(--text-3);
  font-style: italic;
  margin-top: 14px;
  text-align: center;
  letter-spacing: -0.005em;
}

/* Plain-language section (for parents / non-technical) */
.anlx-plain {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 16px;
}

@media (max-width: 980px) {
  .anlx-plain { grid-template-columns: 1fr; }
}

.anlx-plain-card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--hr);
  border-radius: 18px;
  padding: 28px 28px 26px;
  transition: border-color 240ms var(--ease), transform 240ms var(--ease);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
}

.anlx-plain-card:hover {
  border-color: var(--cyan-hairline);
  transform: translateY(-2px);
}

.anlx-plain-card .quote-mark {
  position: absolute;
  top: 14px;
  right: 22px;
  font-family: 'Geist', sans-serif;
  font-size: 56px;
  line-height: 0.5;
  color: var(--cyan);
  opacity: 0.18;
  user-select: none;
  pointer-events: none;
}

.anlx-plain-q {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-1);
  letter-spacing: -0.018em;
  margin-bottom: 16px;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

.anlx-plain-a {
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.65;
  letter-spacing: -0.005em;
  position: relative;
  z-index: 1;
}

.anlx-plain-a b { color: var(--text-1); font-weight: 600; }
.anlx-plain-a a { color: var(--cyan); text-decoration: none; border-bottom: 1px solid var(--cyan-hairline); padding-bottom: 1px; }
.anlx-plain-a a:hover { border-bottom-color: var(--cyan); color: var(--text-1); }

/* Section headlines — softer, more editorial */
.anlx-h2 {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: -0.022em;
  line-height: 1.2;
  margin: 64px 0 22px;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 14px;
}

.anlx-h2::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan) 0%, transparent 100%);
  flex-shrink: 0;
}

.anlx-h2:first-of-type { margin-top: 8px; }

.anlx-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.anlx-metric {
  background: var(--bg-elev);
  border: 1px solid var(--hr);
  border-radius: 16px;
  padding: 20px 22px;
  transition: border-color 200ms var(--ease), transform 200ms var(--ease);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
}

.anlx-metric:hover {
  border-color: var(--cyan-hairline);
  transform: translateY(-1px);
}

.anlx-metric .lbl {
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.anlx-metric .v {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 26px;
  color: var(--text-1);
  letter-spacing: -0.025em;
  line-height: 1;
}

.anlx-metric .v.cyan { color: var(--cyan); }

.anlx-metric .note {
  margin-top: 10px;
  font-family: 'Geist', sans-serif;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
}

.anlx-card {
  background: var(--bg-elev);
  border: 1px solid var(--hr);
  border-radius: 18px;
  padding: 28px 30px;
  margin-bottom: 16px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
}

.anlx-lead {
  margin: 0 0 22px;
  font-family: 'Geist', sans-serif;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.6;
  letter-spacing: -0.005em;
  font-family: 'Geist', sans-serif;
}

.anlx-lead b { color: var(--text-1); font-weight: 600; }

.anlx-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.anlx-row {
  display: grid;
  grid-template-columns: 220px 1fr 100px;
  align-items: center;
  gap: 14px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
}

.anlx-row-name {
  color: var(--text-2);
  letter-spacing: 0.02em;
}

.anlx-row-name b { color: var(--text-1); font-weight: 600; }

.anlx-row-bar {
  position: relative;
  height: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  overflow: hidden;
}

.anlx-row-bar .fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: var(--cyan);
  border-radius: 4px;
  transition: width 360ms var(--ease);
}

.anlx-row-val {
  text-align: right;
  color: var(--text-1);
  font-weight: 600;
}

.anlx-row-val.cyan { color: var(--cyan); }

.anlx-row-emphasized {
  padding-top: 12px;
  border-top: 1px solid var(--hr);
  margin-top: 4px;
}

.anlx-callout {
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--cyan-soft);
  border-left: 2px solid var(--cyan);
  border-radius: 6px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
}

.anlx-callout .lbl {
  color: var(--cyan);
  letter-spacing: 0.06em;
}

.anlx-callout .val { color: var(--text-1); }

.anlx-note {
  margin: 18px 0 0;
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.6;
  font-family: 'Geist', sans-serif;
}

@media (max-width: 720px) {
  .anlx-row { grid-template-columns: 1fr; gap: 4px; }
  .anlx-row-bar { height: 6px; }
}

.anlx-formulas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}

@media (max-width: 720px) {
  .anlx-formulas { grid-template-columns: 1fr; }
}

.anlx-formula {
  background: var(--bg-elev);
  border: 1px solid var(--hr);
  border-radius: 12px;
  padding: 18px 20px;
}

.anlx-formula .lbl {
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.10em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.anlx-formula code {
  display: block;
  background: rgba(93, 234, 255, 0.07);
  border: 1px solid rgba(93, 234, 255, 0.18);
  border-radius: 6px;
  padding: 10px 12px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--cyan);
  margin-bottom: 12px;
  word-break: break-word;
}

.anlx-formula .explain {
  font-family: 'Geist', sans-serif;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.55;
}

.anlx-formula .explain code {
  display: inline;
  padding: 1px 4px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--hr);
  color: var(--text-1);
  margin: 0;
}

.anlx-sources {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}

@media (max-width: 720px) {
  .anlx-sources { grid-template-columns: 1fr; }
}

.anlx-source {
  background: var(--bg-elev);
  border: 1px solid var(--hr);
  border-radius: 12px;
  overflow: hidden;
}

.anlx-source .head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--hr);
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-1);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.anlx-source .head .tag {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.10em;
  color: var(--cyan);
  background: var(--cyan-soft);
  padding: 3px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 500;
}

.anlx-source .body {
  padding: 14px 18px;
}

.anlx-source .body .row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--hr);
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
}

.anlx-source .body .row:last-child { border: none; }
.anlx-source .body .row .k { color: var(--text-3); letter-spacing: 0.04em; }
.anlx-source .body .row .v { color: var(--text-1); }

.anlx-caveats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 720px) {
  .anlx-caveats { grid-template-columns: 1fr; }
}

.anlx-caveat {
  background: var(--bg-elev);
  border: 1px solid var(--hr);
  border-left: 2px solid #FBBF24;
  border-radius: 12px;
  padding: 16px 18px;
}

.anlx-caveat .lbl {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-1);
  letter-spacing: -0.005em;
  margin-bottom: 6px;
}

.anlx-caveat .body {
  font-family: 'Geist', sans-serif;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.55;
}

.anlx-caveat .body code {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hr);
  border-radius: 3px;
  padding: 1px 4px;
  color: var(--text-1);
}

.anlx-pipe {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
  white-space: pre;
  overflow-x: auto;
}

.anlx-chart-wrap {
  position: relative;
  height: 240px;
  width: 100%;
  margin: 8px 0;
}

.anlx-foot {
  margin: 28px 0 32px;
  padding: 16px 20px;
  background: rgba(82, 224, 143, 0.05);
  border: 1px solid rgba(82, 224, 143, 0.18);
  border-radius: 10px;
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
}

.anlx-foot b { color: var(--text-1); font-weight: 600; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── AUTH (login modal + topbar slot) ────────────────────────────── */

.topbar .auth-slot {
  display: inline-flex;
  align-items: center;
  position: relative;
  flex-shrink: 0;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: -0.005em;
  color: var(--bg-room);
  background: var(--cyan);
  border: 1px solid var(--cyan);
  border-radius: 99px;
  cursor: pointer;
  transition: background 200ms var(--ease);
}
.auth-btn:hover { background: rgba(93, 234, 255, 0.85); }
.auth-btn:active { transform: translateY(0.5px); }

.auth-btn-user {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hr);
  color: var(--text-1);
  padding: 5px 12px 5px 5px;
  gap: 9px;
}
.auth-btn-user:hover {
  background: var(--cyan-soft);
  border-color: var(--cyan-hairline);
}

/* Auth-undetermined placeholder: same footprint as the user pill, non-clickable,
   gently pulsing — so the header doesn't jump and a click can't open login. */
.auth-btn-loading {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hr);
  color: transparent;
  padding: 5px 12px 5px 5px;
  gap: 9px;
  cursor: default;
  pointer-events: none;
}
.auth-avatar-skel {
  width: 22px; height: 22px; border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
}
.auth-skel-line { width: 54px; height: 9px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); }
.auth-btn-loading { animation: authPulse 1.1s ease-in-out infinite; }
@keyframes authPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.auth-avatar {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}

.auth-username {
  font-weight: 500;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 268px;
  max-height: min(80vh, 560px);
  overflow-y: auto;
  background: var(--bg-elev);
  border: 1px solid var(--hr-strong);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  z-index: 110;
}
.auth-menu[hidden] { display: none; }

.auth-menu-header {
  padding: 12px 10px 14px;
  border-bottom: 1px solid var(--hr);
  margin-bottom: 4px;
}
.auth-menu-name {
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}
.auth-menu-email {
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  color: var(--text-3);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-menu-tier {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--cyan);
  margin-top: 8px;
}
.auth-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  font-family: 'Geist', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  padding: 9px 10px;
  background: transparent;
  border: 0;
  color: var(--text-1);
  border-radius: 6px;
  cursor: pointer;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.auth-menu-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--cyan);
}
.auth-menu a.auth-menu-item { text-decoration: none; }
.auth-pf-slot:empty { display: none; }
.auth-pf { display: flex; flex-direction: column; gap: 3px; padding: 11px 12px; margin: 2px 0 6px; border: 1px solid var(--hr); border-radius: 8px; background: rgba(255,255,255,0.02); text-decoration: none; }
.auth-pf:hover { border-color: var(--cyan-hairline); background: var(--cyan-soft); }
.auth-pf-lbl { font-family: 'Geist Mono', monospace; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.auth-pf-v { font-family: 'Geist', sans-serif; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; color: var(--text-1); }
.auth-pf-c { font-family: 'Geist Mono', monospace; font-size: 11px; font-weight: 600; }
.auth-pf-c.up { color: #52E08F; } .auth-pf-c.down { color: #FF5468; } .auth-pf-c.flat { color: var(--text-3); }
.auth-pf-empty { display: block; padding: 10px 12px; margin: 2px 0 6px; color: var(--cyan); font-family: 'Geist Mono', monospace; font-size: 12px; font-weight: 600; text-decoration: none; border: 1px dashed var(--hr); border-radius: 8px; }
.auth-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.auth-menu-count {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--cyan);
}
.auth-menu-count:empty { display: none; }
.auth-menu-link[aria-expanded="true"] { color: var(--cyan); background: rgba(255, 255, 255, 0.04); }

/* Notifications render inline inside the dropdown (not a detached floating box). */
.auth-menu .notif-panel {
  position: static;
  width: auto;
  max-width: none;
  margin: 2px 0 4px;
  border: 1px solid var(--hr);
  border-radius: 8px;
  box-shadow: none;
  background: rgba(0, 0, 0, 0.18);
}
.auth-menu .notif-panel .np-body { max-height: 320px; }

/* Modal */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 20px 24px;
  overflow-y: auto;
}
.auth-modal.is-open { display: flex; }

.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 13, 17, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: authFadeIn 0.22s var(--ease);
}
@keyframes authFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes authPanelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.auth-modal-panel {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--bg-elev);
  border: 1px solid var(--hr-strong);
  border-radius: 12px;
  padding: 32px 28px 26px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.6);
  margin: auto;
  animation: authPanelIn 0.32s var(--ease);
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-3);
  font-size: 18px;
  line-height: 1;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 160ms var(--ease);
}
.auth-modal-close:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-1);
  border-color: var(--hr);
}

.auth-modal-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-1);
  margin-bottom: 22px;
}
.auth-modal-mark { color: var(--cyan); display: inline-flex; }

.auth-modal-tabs {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hr);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 22px;
}
.auth-tab {
  font-family: 'Geist', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  background: transparent;
  border: 0;
  color: var(--text-3);
  border-radius: 6px;
  cursor: pointer;
  transition: all 160ms var(--ease);
}
.auth-tab:hover { color: var(--text-2); }
.auth-tab.is-active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-1);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-modal-title {
  font-family: 'Geist', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin-bottom: 6px;
}
.auth-modal-sub {
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
  margin-bottom: 22px;
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label {
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.auth-optional {
  font-family: 'Geist Mono', monospace;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--text-3);
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.7;
}

.auth-field input {
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 400;
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hr);
  color: var(--text-1);
  border-radius: 8px;
  outline: none;
  transition: border-color 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease);
}
.auth-field input::placeholder { color: var(--text-3); }
.auth-field input:hover { background: rgba(255, 255, 255, 0.05); }
.auth-field input:focus {
  border-color: var(--cyan);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px var(--cyan-soft);
}

.auth-error {
  font-family: 'Geist', sans-serif;
  font-size: 12px;
  line-height: 1.5;
  color: #FF6B7A;
  background: rgba(255, 84, 104, 0.08);
  border: 1px solid rgba(255, 84, 104, 0.22);
  border-radius: 6px;
  padding: 9px 11px;
  margin-top: 2px;
}

.auth-submit {
  font-family: 'Geist', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  padding: 12px 18px;
  background: var(--cyan);
  border: 1px solid var(--cyan);
  color: var(--bg-room);
  border-radius: 8px;
  cursor: pointer;
  margin-top: 4px;
  transition: background 160ms var(--ease);
}
.auth-submit:hover { background: rgba(93, 234, 255, 0.85); }
.auth-submit:disabled { opacity: 0.55; cursor: not-allowed; }

.auth-fine {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--text-3);
  margin-top: 18px;
  text-align: center;
}

@media (max-width: 720px) {
  .topbar .auth-btn { padding: 6px 11px; font-size: 11.5px; }
  .topbar .auth-btn-user .auth-username { display: none; }
  .auth-modal { padding: 24px 16px 16px; }
  .auth-modal-panel { padding: 28px 22px 22px; max-width: 100%; }
}

/* ── Notifications bell + panel (topbar) ──────────────────────────── */
.notif-bell {
  position: relative; width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  background: none; border: 1px solid var(--hr-strong); border-radius: 9px;
  color: var(--text-2); cursor: pointer;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.notif-bell:hover { color: var(--text-1); border-color: var(--cyan-hairline); }
.notif-bell svg { width: 17px; height: 17px; }
.notif-bell .num {
  position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 9px; background: #FF5468; color: #fff;
  font-family: 'Geist Mono', monospace; font-size: 10px; font-weight: 700;
  display: none; place-items: center; line-height: 16px;
}
.notif-bell .num.on { display: grid; }

.notif-wrap { position: relative; display: inline-flex; }
.notif-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  width: 340px; max-width: calc(100vw - 24px);
  background: var(--bg-elev); border: 1px solid var(--hr-strong); border-radius: 14px;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,0.6); overflow: hidden;
}
.np-tabs { display: flex; border-bottom: 1px solid var(--hr); }
.np-tab {
  flex: 1; padding: 12px; background: none; border: none; cursor: pointer;
  font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-3); border-bottom: 2px solid transparent;
}
.np-tab.on { color: var(--text-1); border-bottom-color: var(--cyan); }
.np-body { max-height: 60vh; overflow-y: auto; }
.np-empty { padding: 30px 18px; text-align: center; color: var(--text-3); font-size: 13px; line-height: 1.5; }
.np-readall { width: 100%; padding: 9px; background: none; border: none; border-bottom: 1px solid var(--hr); color: var(--cyan); font-family: 'Geist Mono', monospace; font-size: 11px; cursor: pointer; }
.np-readall:hover { background: rgba(93,234,255,0.05); }
.np-item, .np-alert {
  display: flex; align-items: center; gap: 11px; padding: 13px 15px;
  border-bottom: 1px solid var(--hr); cursor: pointer;
}
.np-item:last-child, .np-alert:last-child { border-bottom: none; }
.np-item:hover, .np-alert:hover { background: #14171F; }
.np-item.unread { background: rgba(93,234,255,0.04); }
.np-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.np-dot.up { background: #52E08F; } .np-dot.down { background: #FF5468; }
.np-txt { min-width: 0; flex: 1; }
.np-t { font-weight: 600; font-size: 13px; color: var(--text-1); line-height: 1.3; }
.np-b { font-family: 'Geist Mono', monospace; font-size: 11.5px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-del { flex: none; width: 24px; height: 24px; border-radius: 6px; border: 1px solid transparent; background: none; color: var(--text-3); font-size: 16px; cursor: pointer; line-height: 1; }
.np-del:hover { color: #FF5468; border-color: #FF5468; }
@media (max-width: 640px) {
  .notif-panel { position: fixed; top: calc(var(--topbar-h) + 4px); left: 8px; right: 8px; width: auto; max-width: none; }
}

/* ── Mobile system: no accidental pull-to-refresh, no sideways scroll ── */
html, body { overscroll-behavior-y: contain; }
body { overflow-x: hidden; }

/* ── Bottom navigation (phones only) — primary nav with 44px targets ──── */
.bottom-nav { display: none; }
@media (max-width: 640px) {
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(11, 13, 17, 0.94);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--hr);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .bn-item {
    flex: 1; min-height: 56px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 4px;
    text-decoration: none; color: var(--text-3);
    font-family: 'Geist', sans-serif; font-size: 10px; font-weight: 600; letter-spacing: 0.02em;
    transition: color 160ms var(--ease);
  }
  .bn-item svg { width: 22px; height: 22px; }
  .bn-item:active { color: var(--text-1); }
  .bn-item.on { color: var(--cyan); }
  /* keep content clear of the fixed bar */
  #route-content { padding-bottom: 84px; }
  body.route-active main:not(#route-content) { padding-bottom: 84px; }
}
