/* DeciDash (Decibel Dash) — community analytics. Brand: yellow #FFF600 on near-black. */
/* Fonts are self-hosted (assets/vendor/fonts): no third-party request, works with a strict CSP. */
@font-face { font-family: "Geist"; src: url("vendor/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("vendor/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --surface-1: #121212;
  --surface-2: #1a1a19;
  --border: #262626;
  --grid: #222221;
  --text-primary: #f0efec;
  --text-secondary: #c3c2b7;
  --text-muted: #8a8980;
  --brand: #fff600;
  --brand-ink: #0a0a0a;
  --up: #43b883;
  --down: #ec5a40;
  --radius: 8px;
  --sidebar-w: 232px;
  --font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text-primary); font-family: var(--font); font-size: 14px; }
a { color: inherit; }
button { font-family: inherit; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--surface-1); border-right: 1px solid var(--border); padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 5px; background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center; font-weight: 900; font-size: 13px; letter-spacing: -0.5px; }
.brand-name { font-weight: 800; font-size: 15px; line-height: 1.1; }
.brand-name small { display: block; color: var(--text-muted); font-weight: 500; font-size: 11px; }
.nav-group { margin: 14px 0 4px; padding: 0 8px; color: var(--text-muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.nav-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 5px;
  color: var(--text-secondary); text-decoration: none; font-size: 13.5px; }
.nav-item:hover { background: var(--surface-2); color: var(--text-primary); }
.nav-item.active { background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.nav-item.disabled { opacity: .45; pointer-events: none; }
.badge-soon { font-size: 10px; border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; color: var(--text-muted); }

.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 24px; background: rgba(10,10,10,.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar h1 { margin: 0; font-size: 18px; font-weight: 800; }
.topbar .sub { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; background: none; border: 1px solid var(--border); color: var(--text-primary); border-radius: 5px; padding: 6px 10px; cursor: pointer; }
.cta { background: var(--brand); color: var(--brand-ink); text-decoration: none; font-weight: 800; padding: 8px 14px; border-radius: 5px; font-size: 13px; white-space: nowrap; }
.content { padding: 20px 24px 40px; max-width: 1480px; }

/* ---------- Controls ---------- */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 2px; }
.seg button { background: none; border: 0; color: var(--text-muted); padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: 600; }
.seg button:hover { color: var(--text-primary); }
.seg button.on { background: var(--brand); color: var(--brand-ink); }
.input { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-primary); border-radius: 5px; padding: 7px 10px; font-size: 13px; min-width: 180px; }
.input:focus { outline: 2px solid var(--brand); outline-offset: 0; }

/* ---------- Cards / KPIs ---------- */
.grid { display: grid; gap: 14px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 14px; }
.card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.card-t { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.card-t .hint { font-weight: 400; color: var(--text-muted); font-size: 12px; margin-left: 6px; }
.kpi-label { color: var(--text-muted); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-value { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.kpi-sub { color: var(--text-muted); font-size: 12px; display: flex; gap: 12px; flex-wrap: wrap; }
.kpi-sub b { font-weight: 600; }
.up { color: var(--up); } .down { color: var(--down); } .muted { color: var(--text-muted); }
.hero { border-color: #3a3a18; background: linear-gradient(180deg, #17170c 0%, var(--surface-1) 70%); }
.alltime { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.alltime .kpi-value { font-size: 20px; }

.row2 { grid-template-columns: 1fr 1fr; }
.row-main { grid-template-columns: 2fr 1fr; }
.chart { width: 100%; height: 320px; }
.chart.tall { height: 420px; }
.chart.short { height: 260px; }
.section-title { font-size: 15px; font-weight: 800; margin: 22px 0 10px; }
.note { color: var(--text-muted); font-size: 12px; margin-top: 8px; line-height: 1.5; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--grid); }
th:first-child, td:first-child, th.l, td.l { text-align: left; }
th { color: var(--text-muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; background: var(--surface-1); cursor: pointer; user-select: none; }
th.nosort { cursor: default; }
th .arr { opacity: .4; margin-left: 4px; }
th.sorted .arr { opacity: 1; color: var(--brand); }
tbody tr:hover { background: var(--surface-2); }
.mk { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.chip { font-size: 10.5px; font-weight: 600; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); color: var(--text-muted); }
.chip.warn { border-color: #5a4a10; color: #fab219; }
.addr { font-family: var(--mono); font-size: 12.5px; text-decoration: none; }
.addr:hover { color: var(--brand); text-decoration: underline; }
.bar-cell { display: inline-block; vertical-align: middle; width: 70px; height: 6px; background: var(--surface-2); border-radius: 3px; margin-right: 8px; overflow: hidden; }
.bar-cell i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.pager { display: flex; align-items: center; justify-content: space-between; color: var(--text-muted); font-size: 12px; padding-top: 10px; }
.pager button { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-primary); border-radius: 4px; padding: 4px 10px; cursor: pointer; }
.pager button:disabled { opacity: .35; cursor: default; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-secondary); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.footer { color: var(--text-muted); font-size: 12px; line-height: 1.6; border-top: 1px solid var(--border); margin-top: 28px; padding-top: 14px; }
.soon-box { text-align: center; padding: 50px 20px; color: var(--text-secondary); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .row2, .row-main { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 20; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.55); }
  .menu-btn { display: inline-block; }
  .content { padding: 16px 14px 32px; }
  .topbar { padding: 10px 14px; }
  .cta { display: none; }
  .kpi-value { font-size: 22px; }
}

.dist .bar-cell { width: 48px; }
.dist th, .dist td { padding: 9px 6px; }

/* ---------- Home layout (HyperScreener-style) ---------- */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; margin-bottom: 18px; }
.hero-side { display: grid; grid-template-rows: auto 1fr; gap: 14px; min-width: 0; }
.hero-mini { grid-template-columns: 1fr 1fr; }
.card.mini { padding: 14px 16px 10px; }
.card.mini .kpi-value { font-size: 22px; }
.spark { width: 100%; height: 56px; margin-top: 6px; }
.card-t.big { font-size: 16px; color: var(--text-primary); }
.section-label { color: var(--text-muted); font-size: 12px; font-weight: 600; margin: 4px 0 10px; display: flex; align-items: center; gap: 10px; }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.alltime-strip { display: grid; grid-template-columns: repeat(5, 1fr); margin-bottom: 18px; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); }
.alltime-strip > div { padding: 16px 20px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.alltime-strip > div:first-child { border-left: 0; }
.alltime-strip span { color: var(--text-muted); font-size: 12px; font-weight: 600; }
.alltime-strip b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .home-hero { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .alltime-strip { grid-template-columns: 1fr 1fr; }
  .alltime-strip > div { border-left: 0; border-top: 1px solid var(--border); }
  .alltime-strip > div:nth-child(-n+2) { border-top: 0; }
  .alltime-strip > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .hero-mini { grid-template-columns: 1fr; }
}

/* ---------- Background: black terminal with a faint chart grid, yellow light and grain ---------- */
html { background: #060605; }
body {
  min-height: 100vh; position: relative; isolation: isolate;
  background:
    radial-gradient(900px 520px at 8% -6%, rgba(255, 246, 0, 0.13), transparent 62%),
    radial-gradient(700px 480px at 96% 2%, rgba(255, 200, 0, 0.07), transparent 60%),
    radial-gradient(1000px 700px at 50% 120%, rgba(255, 246, 0, 0.06), transparent 62%),
    conic-gradient(from 210deg at 18% 0%, transparent 0deg, rgba(255, 246, 0, 0.035) 18deg, transparent 40deg),
    linear-gradient(180deg, #0e0d06 0%, #090907 40%, #060605 100%);
  background-attachment: fixed;
}
/* Chart grid: 48 px cells, brightest near the top, fading out down the page. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 246, 0, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 246, 0, 0.11) 1px, transparent 1px),
    linear-gradient(rgba(255, 246, 0, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 246, 0, 0.06) 1px, transparent 1px);
  background-size: 192px 192px, 192px 192px, 48px 48px, 48px 48px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(1200px 760px at 30% 0%, #000 0%, rgba(0,0,0,.45) 45%, transparent 80%);
  mask-image: radial-gradient(1200px 760px at 30% 0%, #000 0%, rgba(0,0,0,.45) 45%, transparent 80%);
}
/* Film grain: breaks gradient banding and gives the black some texture. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (max-width: 640px) { body::before { background-size: 128px 128px, 128px 128px, 32px 32px, 32px 32px; } }
@media print { body::before, body::after { display: none; } }
/* Cards and chrome go translucent so the glow shows through. */
.card, .alltime-strip { background: linear-gradient(180deg, rgba(28, 27, 16, 0.72), rgba(16, 16, 12, 0.78)); border-color: rgba(255, 246, 0, 0.08); backdrop-filter: blur(6px); }
.card.hero, .card.hero-chart { background: linear-gradient(180deg, rgba(48, 45, 12, 0.55), rgba(16, 16, 12, 0.8)); border-color: rgba(255, 246, 0, 0.14); }
.sidebar { background: linear-gradient(180deg, rgba(24, 23, 10, 0.92), rgba(10, 10, 8, 0.95)); border-right-color: rgba(255, 246, 0, 0.08); }
.topbar { background: rgba(10, 10, 6, 0.72); border-bottom-color: rgba(255, 246, 0, 0.08); }
th { background: transparent; }
tbody tr:hover { background: rgba(255, 246, 0, 0.04); }
.seg, .input, .pager button { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 246, 0, 0.10); }
.bar-cell { background: rgba(255, 255, 255, 0.06); }
.bar-cell i { background: linear-gradient(90deg, rgba(200, 180, 40, 0.25), rgba(255, 246, 0, 0.70)); }
.alltime-strip > div { border-left-color: rgba(255, 246, 0, 0.08); }
.section-label::after { background: rgba(255, 246, 0, 0.10); }

/* ---------- Export tools ---------- */
.exp-tools { display: inline-flex; gap: 4px; margin-left: auto; }
.card-h > .exp-tools { order: 99; }
.exp-tools button { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,246,0,0.12); color: var(--text-secondary); border-radius: 5px; padding: 4px 9px; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.exp-tools button:hover { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: #1d1c0e; color: var(--text-primary); border: 1px solid rgba(255,246,0,0.3); padding: 10px 16px; border-radius: 6px; font-size: 13px; font-weight: 600; opacity: 0; transition: .2s; z-index: 60; pointer-events: none; }
#toast.show { opacity: 1; transform: translateX(-50%); }
.img-modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: grid; place-items: center; z-index: 50; padding: 20px; }
.img-modal-box { background: #121210; border: 1px solid rgba(255,246,0,0.2); border-radius: 8px; padding: 16px; max-width: min(1100px, 96vw); max-height: 92vh; overflow: auto; }
.img-modal-box img { width: 100%; height: auto; border-radius: 5px; display: block; }
.pager-close { background: none; border: 1px solid var(--border); color: var(--text-primary); border-radius: 4px; padding: 2px 8px; cursor: pointer; }

/* ---------- DeciDash brand ---------- */
svg.brand-mark { width: 34px; height: 34px; flex: none; display: block; background: none; border-radius: 6px; }
.brand-name { font-weight: 900; font-size: 18px; letter-spacing: -0.3px; }
.brand-accent { color: var(--brand); }

/* ---------- Icon toggles (chart type, export) ---------- */
.seg button.ico, .exp-tools button.ico { display: inline-grid; place-items: center; width: 30px; height: 26px; padding: 0; }
.seg button.ico svg, .exp-tools button.ico svg { width: 16px; height: 16px; }
.exp-tools button.ico { border-radius: 5px; }

/* ---------- Fluid, full-screen layout ---------- */
/* Use the whole viewport width on every screen; charts scale with viewport height. */
.content { max-width: none; width: 100%; padding: clamp(14px, 1.4vw, 32px) clamp(14px, 1.6vw, 40px) 40px; }
.chart { height: clamp(240px, 34vh, 560px); }
.chart.tall { height: clamp(300px, 48vh, 760px); }
.chart.short { height: clamp(200px, 26vh, 480px); }
/* Hero: left chart and right column share one height; their charts stretch to fill it. */
.home-hero { align-items: stretch; }
.hero-chart, .hero-side > .card:last-child { display: flex; flex-direction: column; }
.hero-chart .chart { flex: 1 1 auto; min-height: clamp(300px, 48vh, 760px); height: auto; }
.hero-side > .card:last-child .chart { flex: 1 1 auto; min-height: 200px; height: auto; }
.row2 > .card { display: flex; flex-direction: column; }
.row2 > .card .chart { flex: 1 1 auto; }
/* Keep export icons on the header row instead of wrapping under the controls. */
.card-h { flex-wrap: wrap; row-gap: 8px; }
/* Very large screens: slightly larger type so the page doesn't look sparse. */
@media (min-width: 2200px) {
  html, body { font-size: 15px; }
  .kpi-value { font-size: 30px; }
  .alltime-strip b { font-size: 26px; }
  :root { --sidebar-w: 260px; }
}
@media (max-width: 860px) {
  .chart, .chart.tall, .hero-chart .chart { min-height: 0; height: clamp(240px, 42vh, 420px); }
}

/* ---------- Typography: Geist, lighter weights ---------- */
html, body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "tnum" 1, "ss01" 1; letter-spacing: -0.005em; }
.topbar h1 { font-weight: 600; letter-spacing: -0.02em; }
.topbar .sub, .note, .kpi-sub { font-weight: 400; }
.brand-name { font-weight: 600; letter-spacing: -0.03em; }
.brand-name small { font-weight: 400; letter-spacing: 0; }
.nav-group { font-weight: 500; letter-spacing: .08em; font-size: 10.5px; }
.nav-item { font-weight: 400; }
.nav-item.active { font-weight: 600; }
.card-t { font-weight: 500; letter-spacing: -0.005em; }
.card-t.big { font-weight: 600; letter-spacing: -0.02em; }
.kpi-label { font-weight: 500; }
.kpi-value { font-weight: 600; letter-spacing: -0.035em; }
.kpi-sub b { font-weight: 500; color: var(--text-secondary); }
.alltime-strip span { font-weight: 500; }
.alltime-strip b { font-weight: 600; letter-spacing: -0.03em; }
.section-label { font-weight: 500; letter-spacing: .02em; }
.seg button { font-weight: 500; }
.cta { font-weight: 600; }
th { font-weight: 500; letter-spacing: .06em; font-size: 11px; }
td { font-weight: 400; }
.mk { font-weight: 600; }
.chip { font-weight: 500; }
.addr { font-family: var(--mono); font-size: 12.5px; letter-spacing: -0.01em; }
.section-title { font-weight: 600; }
#toast { font-weight: 500; }

/* ---------- Top tab navigation (replaces sidebar) ---------- */
.app { display: block; min-height: 100vh; }
.main { min-width: 0; }
.topnav-wrap { position: sticky; top: 0; z-index: 20; padding: 12px clamp(14px, 1.6vw, 40px) 0; }
.topnav {
  display: flex; align-items: center; gap: 16px; padding: 8px 10px 8px 14px;
  background: linear-gradient(180deg, rgba(30, 28, 12, 0.82), rgba(14, 14, 10, 0.86));
  border: 1px solid rgba(255, 246, 0, 0.14); border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
}
.topnav .brand { padding: 0; flex: none; gap: 9px; }
.topnav svg.brand-mark { width: 30px; height: 30px; }
.topnav .brand-name { font-size: 17px; }
.tabs { display: flex; align-items: center; gap: 2px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 7px 13px; border-radius: 6px; color: var(--text-secondary); text-decoration: none; font-size: 13.5px; font-weight: 400; cursor: pointer; list-style: none; transition: background .15s, color .15s; }
.tab:hover { color: var(--text-primary); background: rgba(255, 246, 0, 0.06); }
.tab.active, .tab-more.active > summary { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.tab-more { position: relative; }
.tab-more > summary::-webkit-details-marker { display: none; }
.tab-more .caret { font-size: 10px; opacity: .7; }
.tab-more-s { display: none; }
.tab-more .menu { position: fixed; margin-top: 6px; min-width: 240px; padding: 6px; background: #14130c; border: 1px solid rgba(255, 246, 0, 0.16); border-radius: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.5); z-index: 30; }
.tab-more .menu a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 5px; color: var(--text-secondary); text-decoration: none; font-size: 13px; }
.tab-more .menu a:hover, .tab-more .menu a.active { background: rgba(255, 246, 0, 0.08); color: var(--text-primary); }
.topnav .topbar-right { flex: none; }
.topnav .cta { border-radius: 6px; padding: 8px 14px; }
.topnav .seg { border-radius: 6px; }
.page-head { padding: clamp(14px, 1.4vw, 26px) clamp(14px, 1.6vw, 40px) 0; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.page-head .sub { color: var(--text-muted); font-size: 13px; margin-top: 3px; }
.content { padding-top: 14px; }
@media (max-width: 860px) {
  .topnav { flex-wrap: wrap; gap: 8px; padding: 8px; border-radius: 8px; }
  .topnav .brand { order: 1; }
  .topnav .topbar-right { order: 2; margin-left: auto; }
  .topnav .cta { display: none; }
  .tabs { order: 3; flex-basis: 100%; }
  .tab-more .menu { right: 12px; }
}

/* ---------- Scan-to-trade QR drawer ---------- */
.qr-tab { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px 9px; border: 1px solid rgba(255,246,0,.55); border-right: 0; border-radius: 8px 0 0 8px; cursor: pointer;
  background: linear-gradient(180deg, #fff600, #e6d800); color: #0b0b08; font: 600 12.5px/1 var(--font);
  box-shadow: 0 0 0 0 rgba(255,246,0,.55), -6px 0 24px rgba(255,246,0,.25); animation: qrPulse 2.6s ease-out infinite; transition: transform .25s, opacity .25s; }
.qr-tab:hover { transform: translateY(-50%) translateX(-3px); }
.qr-tab.hide { opacity: 0; pointer-events: none; transform: translateY(-50%) translateX(100%); }
.qr-tab-ico svg { width: 20px; height: 20px; display: block; }
.qr-tab-txt { writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .04em; white-space: nowrap; }
@keyframes qrPulse { 0% { box-shadow: 0 0 0 0 rgba(255,246,0,.45), -6px 0 24px rgba(255,246,0,.25); } 70% { box-shadow: 0 0 0 12px rgba(255,246,0,0), -6px 0 24px rgba(255,246,0,.25); } 100% { box-shadow: 0 0 0 0 rgba(255,246,0,0), -6px 0 24px rgba(255,246,0,.25); } }
.qr-overlay { position: fixed; inset: 0; z-index: 44; background: rgba(0,0,0,.45); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s; }
.qr-overlay.show { opacity: 1; }
.qr-drawer { position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: 45; width: min(380px, calc(100vw - 24px)); overflow-y: auto;
  padding: 22px 22px 18px; border-radius: 10px; border: 1px solid rgba(255,246,0,.22);
  background: radial-gradient(420px 260px at 85% -10%, rgba(255,246,0,.16), transparent 60%), linear-gradient(180deg, #1b190b, #0c0c08);
  box-shadow: -20px 0 60px rgba(0,0,0,.55); transform: translateX(calc(100% + 24px)); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.qr-drawer.open { transform: none; }
.qr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.qr-kicker { color: var(--brand); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.qr-head h2 { margin: 4px 0 0; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.qr-close { background: rgba(255,255,255,.05); border: 1px solid rgba(255,246,0,.15); color: var(--text-primary); width: 32px; height: 32px; border-radius: 6px; cursor: pointer; }
.qr-frame { position: relative; margin: 6px auto 0; width: min(260px, 100%); aspect-ratio: 1; padding: 12px; border-radius: 10px; background: rgba(255,246,0,.06); }
.qr-frame .qr-svg { width: 100%; height: 100%; display: block; border-radius: 8px; box-shadow: 0 10px 40px rgba(255,246,0,.12); }
.qr-corners::before, .qr-corners::after, .qr-frame::before, .qr-frame::after { content: ""; position: absolute; width: 26px; height: 26px; border: 3px solid var(--brand); }
.qr-frame::before { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.qr-frame::after { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.qr-corners::before { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.qr-corners::after { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.qr-scan { position: absolute; left: 14px; right: 14px; height: 3px; top: 14px; border-radius: 3px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,230,0,.95), transparent); box-shadow: 0 0 14px 3px rgba(255,236,0,.55); animation: qrScan 2.8s ease-in-out infinite; }
@keyframes qrScan { 0%, 100% { top: 14px; opacity: .2; } 10% { opacity: 1; } 50% { top: calc(100% - 17px); opacity: 1; } 60% { opacity: .9; } }
.qr-sub { text-align: center; color: var(--text-secondary); font-size: 13px; margin: 14px 0 12px; }
.qr-code-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; border: 1px dashed rgba(255,246,0,.35); color: var(--text-muted); font-size: 12.5px; }
.qr-code-row b { color: var(--brand); font-family: var(--mono); font-weight: 500; font-size: 14px; letter-spacing: .04em; }
.qr-copy { background: none; border: 0; color: var(--text-secondary); cursor: pointer; padding: 2px; display: inline-grid; }
.qr-copy svg, .qr-btn svg { width: 15px; height: 15px; }
.qr-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; border-radius: 8px; font: 500 13px var(--font); text-decoration: none; cursor: pointer;
  color: var(--text-primary); background: rgba(255,255,255,.05); border: 1px solid rgba(255,246,0,.18); }
.qr-btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
.qr-btn:hover { filter: brightness(1.08); }
.qr-steps { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 8px; }
.qr-steps li { counter-increment: s; display: flex; gap: 10px; align-items: center; color: var(--text-secondary); font-size: 12.5px; }
.qr-steps li::before { content: counter(s); flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,246,0,.12); color: var(--brand); font-size: 11.5px; font-weight: 600; }
.qr-legal { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid rgba(255,246,0,.10); color: var(--text-muted); font-size: 10.5px; line-height: 1.5; }
.qr-fallback { word-break: break-all; color: #0b0b08; background: #fbf9ee; padding: 10px; border-radius: 6px; font-size: 12px; }
@media (max-width: 860px) {
  .qr-tab { top: auto; bottom: 18px; right: 16px; transform: none; flex-direction: row; padding: 12px 16px; border-radius: 10px; border-right: 1px solid rgba(255,246,0,.55); }
  .qr-tab:hover { transform: none; }
  .qr-tab.hide { transform: translateY(150%); }
  .qr-tab-txt { writing-mode: horizontal-tb; transform: none; }
  /* Phones/tablets: compact round button so it never hides chart tools; room left below the last card. */
  .qr-tab { width: 52px; height: 52px; padding: 0; justify-content: center; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .qr-tab-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .qr-tab-ico svg { width: 22px; height: 22px; }
  .content { padding-bottom: 84px; }
  .qr-drawer { top: auto; left: 10px; right: 10px; bottom: 10px; width: auto; max-height: 88vh; transform: translateY(calc(100% + 24px)); }
}
@media (prefers-reduced-motion: reduce) { .qr-tab, .qr-scan { animation: none; } .qr-drawer { transition: none; } }
/* Drawer hugs its content on desktop (no empty tail); centred vertically on the right edge. */
@media (min-width: 861px) {
  .qr-drawer { top: 50%; bottom: auto; max-height: calc(100vh - 24px); transform: translate(calc(100% + 24px), -50%); }
  .qr-drawer.open { transform: translate(0, -50%); }
}
/* Reserve room for the fixed "Scan to trade" tab so it never covers cards. */
@media (min-width: 861px) { .content, .page-head { padding-right: max(56px, 1.6vw); } .topnav-wrap { padding-right: max(56px, 1.6vw); } }
/* Card header tools (segment + search) and the shared pager. */
.card-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pager { flex-wrap: wrap; gap: 10px 16px; }
.pager-l, .pager-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pager-lbl { color: var(--text-muted); }
.pager-count { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.pager-r button { min-width: 32px; height: 30px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.pager-r button.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
.pager-gap { color: var(--text-muted); padding: 0 2px; }
@media (max-width: 560px) {
  .card-tools { width: 100%; } .card-tools .input { flex: 1 1 100%; min-width: 0; }
  .pager-r { width: 100%; justify-content: center; }
  .pager-r button { min-width: 30px; padding: 0 6px; }
}
.pager-jump { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); margin-left: 4px; }
.pager-jump input { width: 64px; height: 30px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,246,0,.10); color: var(--text-primary); border-radius: 4px; padding: 0 8px; font: inherit; font-variant-numeric: tabular-nums; }
.pager-jump input:focus { outline: 2px solid var(--brand); outline-offset: 0; }
.card:has(> [id^="tbl"]) , [id^="tbl"] { scroll-margin-top: 140px; }
@media (max-width: 420px) { .dist .bar-cell { display: none; } }
/* Language picker: flag + code button, dropdown with flag + native name (same look as the "Coming next" menu). */
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,246,0,.10); border-radius: 5px; color: var(--text-primary); cursor: pointer; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.lang-btn:hover, .lang.open .lang-btn { border-color: rgba(255,246,0,.35); }
.lang-btn .caret { color: var(--text-muted); font-size: 10px; transition: transform .15s; }
.lang.open .lang-btn .caret { transform: rotate(180deg); }
.flag { width: 20px; height: 15px; border-radius: 3px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; list-style: none; margin: 0; padding: 6px; min-width: 250px; max-height: min(70vh, 460px); overflow-y: auto;
  background: #14130c; border: 1px solid rgba(255,246,0,.16); border-radius: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.lang-menu li { display: grid; grid-template-columns: 20px 1fr auto 14px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 5px; cursor: pointer; color: var(--text-secondary); font-size: 13.5px; outline: none; }
.lang-menu li:hover, .lang-menu li:focus { background: rgba(255,246,0,.08); color: var(--text-primary); }
.lang-menu li[aria-selected="true"] { color: var(--text-primary); }
.lang-name { white-space: nowrap; }
.lang-en { color: var(--text-muted); font-size: 11.5px; white-space: nowrap; }
.lang-check { color: var(--brand); font-weight: 700; }
@media (max-width: 560px) { .lang-en { display: none; } .lang-menu li { grid-template-columns: 20px 1fr 14px; } .lang-menu { min-width: 200px; } }
@media (prefers-reduced-motion: reduce) { .lang-btn .caret { transition: none; } }
/* Script-appropriate fallbacks after Geist (Latin/Cyrillic) for CJK languages. */
:root:lang(zh) { --font: "Geist", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif; }
:root:lang(ja) { --font: "Geist", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif; }
:root:lang(ko) { --font: "Geist", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", system-ui, sans-serif; }
.lang-menu li:lang(zh) .lang-name { font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }
.lang-menu li:lang(ja) .lang-name { font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans CJK JP", sans-serif; }
.lang-menu li:lang(ko) .lang-name { font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", sans-serif; }
/* Phone list for wallet tables: compact rows that expand (Traders, Amps). */
.mlist { border: 1px solid rgba(255,246,0,.10); border-radius: 8px; overflow: hidden; }
.mhead, .mrow-h { display: grid; grid-template-columns: 44px 1fr auto 30px; align-items: center; gap: 8px; padding: 0 12px; }
.mhead { grid-template-columns: 44px 1fr auto; height: 44px; color: var(--text-muted); font-size: 12.5px; border-bottom: 1px solid rgba(255,246,0,.08); background: rgba(255,255,255,.02); }
.msort { display: inline-flex; align-items: center; gap: 4px; justify-self: end; }
.msort select { appearance: none; -webkit-appearance: none; background: transparent; border: 0; color: var(--text-secondary); font: inherit; text-transform: none; letter-spacing: 0; font-size: 12.5px; text-align: right; padding: 4px 2px; max-width: 46vw; cursor: pointer; }
.msort select:focus-visible, .mdir:focus-visible, .mrow-h:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 4px; }
.mdir { background: none; border: 0; color: var(--text-muted); cursor: pointer; font-size: 11px; width: 26px; height: 30px; }
.mrow { border-bottom: 1px solid rgba(255,246,0,.06); }
.mrow:last-child { border-bottom: 0; }
.mrow-h { width: 100%; min-height: 54px; background: none; border: 0; color: var(--text-primary); cursor: pointer; text-align: left; font: inherit; }
.mrank { color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.mrank.top { color: var(--brand); font-weight: 600; }
.maddr { font-family: var(--mono); font-size: 13px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mval { font-variant-numeric: tabular-nums; font-size: 13.5px; font-weight: 500; text-align: right; white-space: nowrap; }
.mchev { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; color: var(--text-secondary); background: rgba(255,255,255,.05); transition: transform .18s, background .18s, color .18s; }
.mchev svg { width: 20px; height: 20px; }
.mrow.open .mchev { background: rgba(255,246,0,.14); color: var(--brand); }
.mrow.open .mchev { transform: rotate(180deg); }
.mrow.open { background: rgba(255,246,0,.03); }
.mrow-b { padding: 4px 12px 14px; }
.mrow-b dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin: 0 0 12px; }
.mrow-b dt { color: var(--text-muted); font-size: 11.5px; margin-bottom: 3px; }
.mrow-b dd { margin: 0; font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 500; }
.mact { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border-radius: 6px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,246,0,.12); color: var(--text-primary); font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; }
.mbtn svg { width: 15px; height: 15px; }
.mbtn:hover { border-color: rgba(255,246,0,.35); }
.mempty { padding: 18px 12px; }
@media (prefers-reduced-motion: reduce) { .mchev { transition: none; } }
/* Wallet address → profile (desktop table) */
.addr-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 2px 0; color: var(--text-primary); cursor: pointer; }
.addr-btn:hover { color: var(--brand); }
.addr-go { display: inline-grid; width: 14px; height: 14px; opacity: 0; transition: opacity .15s; color: var(--brand); }
.addr-btn:hover .addr-go, .addr-btn:focus-visible .addr-go { opacity: 1; }
.mbtn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
.mbtn.wide { grid-column: 1 / -1; }

/* Wallet profile: right-side panel on tablets/desktops, bottom sheet on phones. */
.pf-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); z-index: 60; opacity: 0; transition: opacity .2s; }
.pf-overlay.show { opacity: 1; }
.pf { position: fixed; top: 10px; right: 10px; bottom: 10px; width: min(560px, calc(100vw - 20px)); z-index: 61; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #16150d, #0e0e0b 40%); border: 1px solid rgba(255,246,0,.16); border-radius: 10px; box-shadow: -20px 0 60px rgba(0,0,0,.55);
  transform: translateX(calc(100% + 24px)); transition: transform .26s cubic-bezier(.2,.8,.2,1); }
.pf.open { transform: none; }
.pf-grip { display: none; }
.pf-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px 22px; }
html.pf-lock, html.pf-lock body { overflow: hidden; }
.pf-head { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid rgba(255,246,0,.08); }
.ident { width: 48px; height: 48px; border-radius: 8px; display: block; shape-rendering: crispEdges; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.pf-id h2 { margin: 0; font-size: 19px; font-weight: 600; font-family: var(--mono); letter-spacing: -.01em; }
.pf-full { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; background: none; border: 0; padding: 0; color: var(--text-muted); font-family: var(--mono); font-size: 12px; cursor: pointer; }
.pf-full svg { width: 13px; height: 13px; } .pf-full:hover { color: var(--text-primary); }
.pf-actions { display: flex; gap: 6px; }
.pf-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 6px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,246,0,.10); color: var(--text-secondary); cursor: pointer; }
.pf-ico svg { width: 17px; height: 17px; } .pf-ico:hover { color: var(--brand); border-color: rgba(255,246,0,.35); }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 2px; }
.pf-chip { font-size: 12px; color: var(--text-secondary); background: rgba(255,246,0,.07); border: 1px solid rgba(255,246,0,.14); padding: 4px 9px; border-radius: 4px; }
.pf-chip b { color: var(--brand); font-weight: 600; }
.pf-banner { margin: 12px 0 0; padding: 10px 12px; border-radius: 6px; font-size: 12px; line-height: 1.45; color: #1b1a05; background: #e9df4c; font-weight: 500; }
.pf-banner.err { background: rgba(236,90,64,.12); color: #ffb3b8; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pf-banner .mbtn { height: 30px; padding: 0 10px; }
.pf-hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 14px 0; background: rgba(255,246,0,.08); border: 1px solid rgba(255,246,0,.08); border-radius: 8px; overflow: hidden; }
.pf-stat { background: #121109; padding: 11px 12px; min-width: 0; }
.pf-stat > span { display: block; color: var(--text-muted); font-size: 11.5px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-stat b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-card { margin: 0 0 14px; padding: 14px; }
.pf-card .card-h { flex-wrap: wrap; gap: 8px; }
.pf-chart-head { display: flex; align-items: baseline; gap: 8px; min-height: 26px; }
.pf-chart-head b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pf-chart-head > span { color: var(--text-muted); font-size: 12px; }
.pf-chart { height: 220px; position: relative; }
.pf-chart.loading::after { content: ""; position: absolute; inset: 20px 0; border-radius: 6px; background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.07), rgba(255,255,255,.03)); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
.pf-sec { margin: 0 0 16px; }
.pf-sec h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .06em; }
.pf-count { background: rgba(255,246,0,.12); color: var(--brand); border-radius: 4px; padding: 1px 8px; font-size: 11.5px; letter-spacing: 0; }
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,246,0,.08); border: 1px solid rgba(255,246,0,.08); border-radius: 8px; overflow: hidden; }
.pf-grid .pf-stat b { font-size: 14.5px; }
.pf-expo { margin: 0 0 10px; }
.pf-expo-bar { display: flex; height: 8px; border-radius: 2px; overflow: hidden; gap: 2px; background: rgba(255,255,255,.05); }
.pf-expo-bar .l { background: var(--up); } .pf-expo-bar .s { background: var(--down); }
.pf-expo-lbl { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.pf-expo-lbl b { color: var(--text-secondary); font-weight: 500; }
.pf-pos, .pf-trades { display: grid; gap: 8px; }
.pf-p { background: rgba(255,255,255,.025); border: 1px solid rgba(255,246,0,.08); border-radius: 8px; padding: 11px 12px; }
.pf-p-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pf-p-h b { font-size: 15px; }
.pf-side { font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 4px; }
.pf-side.long { color: var(--up); background: rgba(67,184,131,.12); } .pf-side.short { color: var(--down); background: rgba(236,90,64,.12); }
.pf-tag { font-size: 11px; color: var(--text-muted); border: 1px solid rgba(255,255,255,.12); border-radius: 4px; padding: 1px 6px; }
.pf-p-pnl { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.pf-p dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 10px; margin: 0; }
.pf-p dt { color: var(--text-muted); font-size: 11px; } .pf-p dd { margin: 2px 0 0; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-t { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 6px; background: rgba(255,255,255,.02); border: 1px solid rgba(255,246,0,.06); }
.pf-t-l, .pf-t-r { display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.pf-t-r { text-align: right; justify-items: end; font-size: 13px; }
.pf-t-l b { font-size: 14px; } .pf-t small { color: var(--text-muted); font-size: 11px; }
.pf-act { font-size: 12px; }
.pf-empty { color: var(--text-muted); font-size: 13px; padding: 14px; text-align: center; border: 1px dashed rgba(255,246,0,.12); border-radius: 8px; }
.pf-chart .pf-empty { position: absolute; inset: 40px 0 auto; border: 0; }
.pf-skel, .sk { display: block; border-radius: 5px; background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.08), rgba(255,255,255,.03)); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
.pf-skel { height: 84px; } .sk { width: 70%; height: 16px; margin-top: 3px; }
@keyframes sk { to { background-position: -200% 0; } }
.pf-note { color: var(--text-muted); font-size: 11px; line-height: 1.5; margin: 6px 0 0; }
@media (max-width: 640px) {
  .pf { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: 92vh; height: 92dvh; border-radius: 12px 12px 0 0; border-bottom: 0; transform: translateY(100%); box-shadow: 0 -20px 60px rgba(0,0,0,.55); }
  .pf.open { transform: none; }
  .pf-grip { display: block; width: 100%; height: 22px; flex: none; cursor: grab; position: relative; touch-action: none; }
  .pf-grip::before { content: ""; position: absolute; left: 50%; top: 9px; width: 44px; height: 5px; margin-left: -22px; border-radius: 6px; background: rgba(255,255,255,.22); }
  .pf-scroll { padding: 4px 14px calc(18px + env(safe-area-inset-bottom)); }
  .pf-hero, .pf-grid { grid-template-columns: repeat(2, 1fr); }
  .pf-p dl { grid-template-columns: repeat(2, 1fr); }
  .pf-card .card-tools { width: 100%; justify-content: space-between; }
  .pf-head { grid-template-columns: 44px 1fr auto; } .ident { width: 44px; height: 44px; }
  .pf-id h2 { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .pf, .pf-overlay, .mchev { transition: none; } .sk, .pf-skel, .pf-chart.loading::after { animation: none; } }
.pf-card .card-h .card-t { order: 0; } .pf-card .card-h .exp-tools { order: 1; margin-left: auto; } .pf-card .card-h .card-tools { order: 2; }
@media (max-width: 640px) { .pf-card .card-h .card-tools { flex-basis: 100%; } }
.mname { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; }
.mname b { font-weight: 600; font-size: 14px; } .mname .chip { margin: 0; font-size: 10.5px; padding: 1px 6px; }
.mval .bar-cell { width: 44px; margin-right: 6px; vertical-align: middle; }
.mrow-b dd .bar-cell { width: 60px; }
@media (max-width: 560px) { .card-h > .input, .card-h .input { flex: 1 1 100%; min-width: 0; } }
/* ---------- Navigation: tablets wrap the tabs (nothing hidden); phones use a bottom bar ---------- */
.bnav { display: none; }
.tabs { flex-wrap: wrap; overflow: visible; row-gap: 4px; } /* never hide a tab off-screen */
@media (max-width: 640px) {
  .tabs > a.tab { display: none; }          /* main pages live in the bottom bar */
  .tabs { order: 2; flex: 0 1 auto; flex-basis: auto; margin-left: auto; padding: 0; }
  .topnav .topbar-right { order: 3; margin-left: 0; }
  .tab-more > summary.tab { padding: 6px 10px; font-size: 12.5px; border: 1px solid rgba(255,246,0,.12); }
  .bnav { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(12,12,9,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255,246,0,.14); }
  .bnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 4px; border-radius: 8px; color: var(--text-muted); text-decoration: none; font-size: 10.5px; min-width: 0; }
  .bnav a span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bnav svg { width: 22px; height: 22px; }
  .bnav a.on { color: var(--brand); }
  .bnav a.on svg { filter: drop-shadow(0 0 6px rgba(255,246,0,.35)); }
  .bnav a:active { background: rgba(255,246,0,.06); }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .qr-tab { bottom: calc(80px + env(safe-area-inset-bottom)); }
  #toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
/* ---------- Smart Money + market detail ---------- */
.demo-note { margin: 0 0 14px; }
.mk-link { color: inherit; text-decoration: none; border-bottom: 1px dashed rgba(255,246,0,.35); }
.mk-link:hover { color: var(--brand); border-bottom-color: var(--brand); }
.page-head h1 .chip { font-size: 11px; vertical-align: middle; margin-left: 4px; font-weight: 500; }
.mk-back { display: inline-grid; place-items: center; width: 32px; height: 32px; margin-right: 6px; border-radius: 6px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,246,0,.12); color: var(--text-secondary); text-decoration: none; font-size: 16px; vertical-align: middle; }
.mk-back:hover { color: var(--brand); border-color: rgba(255,246,0,.35); }
.bias { display: inline-flex; align-items: center; gap: 8px; }
.bias-bar { display: inline-flex; width: 72px; height: 7px; border-radius: 2px; overflow: hidden; gap: 2px; background: rgba(255,255,255,.05); }
.bias-bar .l { background: var(--up); } .bias-bar .s { background: var(--down); }
.kpi-value .bias-bar { width: 110px; height: 9px; } .kpi-value .bias b { font-size: inherit; }
.bias b { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 34px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-secondary); cursor: pointer; user-select: none; }
.chk input { accent-color: var(--brand); width: 15px; height: 15px; }
.feed { display: grid; gap: 6px; }
.feed-row { display: grid; grid-template-columns: 72px minmax(56px, .8fr) minmax(90px, 1.1fr) minmax(70px, .8fr) minmax(80px, 1fr) auto; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 6px; background: rgba(255,255,255,.02); border: 1px solid rgba(255,246,0,.06); font-size: 13px; font-variant-numeric: tabular-nums; }
.feed-row.is-liq { border-color: rgba(236,90,64,.35); background: rgba(236,90,64,.05); }
.feed-time { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.feed-m b { font-weight: 600; }
.feed-act { font-size: 12.5px; white-space: nowrap; }
.feed-usd { font-weight: 600; text-align: right; }
.feed-px { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.feed-a { justify-self: end; font-size: 12px; }
.liq-tag { font-style: normal; font-size: 10.5px; font-weight: 600; color: #fff; background: var(--down); border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.mbtn.more { width: 100%; margin-top: 10px; }
.mk-coh { padding: 10px 0; border-bottom: 1px solid rgba(255,246,0,.06); }
.mk-coh-h { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-secondary); margin-bottom: 6px; }
.mk-coh .bias-bar { width: 100%; height: 8px; } .mk-coh .bias { display: flex; }
.mk-coh-v { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.mk-sub { margin: 14px 0 8px; font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .06em; }
#mk-pos .feed-row { grid-template-columns: auto auto 1fr auto auto; }
@media (max-width: 640px) {
  .feed-row { grid-template-columns: auto 1fr auto; grid-template-areas: "m act usd" "time a px"; row-gap: 3px; }
  .feed-m { grid-area: m; } .feed-act { grid-area: act; } .feed-usd { grid-area: usd; }
  .feed-time { grid-area: time; } .feed-a { grid-area: a; justify-self: start; } .feed-px { grid-area: px; text-align: right; }
  #mk-pos .feed-row { grid-template-columns: auto auto 1fr; grid-template-areas: none; }
  #mk-pos .feed-row > * { grid-area: auto; }
  .bnav a { font-size: 10px; }
  .bnav svg { width: 21px; height: 21px; }
}
/* ---------- Support button + sheet ---------- */
.help-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,246,0,.12); color: var(--text-secondary); cursor: pointer; padding: 0; }
.help-btn svg { width: 19px; height: 19px; } .help-btn:hover { color: var(--brand); border-color: rgba(255,246,0,.35); }
.sp-head { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: start; padding-bottom: 14px; border-bottom: 1px solid rgba(255,246,0,.08); }
.sp-head h2 { margin: 2px 0 2px; font-size: 18px; font-weight: 600; } .sp-head p { margin: 0; color: var(--text-muted); font-size: 13px; }
.sp-badge { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; background: rgba(255,246,0,.1); color: var(--brand); }
.sp-badge svg { width: 24px; height: 24px; }
.sp-h { margin: 18px 0 8px; font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .06em; }
.sp-links { display: grid; gap: 8px; }
.sp-link { display: grid; grid-template-columns: 22px 1fr 16px; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 8px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,246,0,.10); color: var(--text-primary); text-decoration: none; font-size: 14px; }
.sp-link svg { width: 20px; height: 20px; color: var(--brand); } .sp-link .sp-go { width: 15px; height: 15px; color: var(--text-muted); }
.sp-link:hover { border-color: rgba(255,246,0,.35); }
.sp-safe { display: grid; grid-template-columns: 26px 1fr; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: 8px; background: rgba(236,90,64,.07); border: 1px solid rgba(236,90,64,.28); }
.sp-safe svg { width: 24px; height: 24px; color: #ff8a92; } .sp-safe b { font-size: 13.5px; } .sp-safe p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }
.sp-faq details { border-bottom: 1px solid rgba(255,246,0,.08); padding: 10px 0; }
.sp-faq summary { cursor: pointer; font-size: 14px; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.sp-faq summary::-webkit-details-marker { display: none; }
.sp-faq summary::after { content: "+"; color: var(--brand); font-weight: 600; } .sp-faq details[open] summary::after { content: "–"; }
.sp-faq p { margin: 8px 0 0; color: var(--text-secondary); font-size: 13px; line-height: 1.55; }
.foot-sup { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 12px; }
.foot-sup .mbtn { padding: 0 12px; height: 34px; } .foot-sup svg { width: 16px; height: 16px; }
@media (max-width: 640px) { .help-btn { width: 32px; height: 32px; } }

/* ---------- Admin ---------- */
.adm-login { max-width: 420px; margin: 20px auto; text-align: center; padding: 28px 22px; }
.adm-login .sp-badge { margin: 0 auto 10px; } .adm-login h2 { margin: 0 0 6px; font-size: 19px; }
.adm-login form { display: grid; gap: 12px; margin-top: 16px; text-align: left; } .adm-login .input { width: 100%; box-sizing: border-box; height: 40px; }
.adm-login .mbtn { height: 40px; }
.adm-bar-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.adm-live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-right: auto; }
.adm-live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 0 rgba(67,184,131,.6); animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 70% { box-shadow: 0 0 0 7px rgba(67,184,131,0); } 100% { box-shadow: 0 0 0 0 rgba(67,184,131,0); } }
.adm-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1200px) { .adm-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .adm-4 { grid-template-columns: 1fr; } }
.adm-bars { display: grid; gap: 8px; }
.adm-bar { display: grid; grid-template-columns: minmax(80px, 1.2fr) 2fr auto 38px; gap: 8px; align-items: center; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.adm-bar-k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-secondary); }
.adm-bar-t { height: 7px; border-radius: 2px; background: rgba(255,255,255,.05); overflow: hidden; } .adm-bar-t i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, rgba(255,246,0,.35), rgba(255,246,0,.8)); }
.adm-bar b { font-weight: 600; text-align: right; } .adm-bar small { color: var(--text-muted); text-align: right; }
.adm-health { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 12px; }
.adm-h { display: grid; gap: 3px; padding: 11px 12px; border-radius: 8px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,246,0,.08); font-size: 12.5px; }
.adm-h b { font-size: 14px; } .adm-h small { color: var(--text-muted); font-size: 11.5px; }
.adm-h-st { font-size: 11.5px; font-weight: 600; } .adm-h.ok .adm-h-st { color: var(--up); } .adm-h.late .adm-h-st { color: #f5b544; } .adm-h.stale .adm-h-st, .adm-h.missing .adm-h-st { color: var(--down); }
.adm-h.stale, .adm-h.missing { border-color: rgba(236,90,64,.3); }
.adm-proxy { margin-bottom: 10px; }
@media (prefers-reduced-motion: reduce) { .adm-live .dot { animation: none; } }
@media (max-width: 400px) {
  .topnav { gap: 6px; }
  .topnav svg.brand-mark { width: 26px; height: 26px; } .topnav .brand-name { font-size: 15px; } .topnav .brand { gap: 7px; }
  .tab-more > summary.tab { padding: 6px 8px; font-size: 12px; }
  .lang-btn { padding: 0 8px; gap: 5px; }
}
/* Narrow phones: compact topbar buttons so the Guide icon fits; on the narrowest screens the Guide
   stays reachable from the Guide button in the footer. */
@media (max-width: 440px) {
  .topnav .topbar-right { gap: 4px; }
  .help-btn { width: 30px; height: 30px; } .help-btn svg { width: 16px; height: 16px; }
  .tab-more > summary.tab { padding: 6px 6px; }
}
@media (max-width: 374px) { #guide-btn { display: none; } }
@media (max-width: 440px) { /* room for the news bell: flag alone, long "Coming soon" labels truncated */
  .lang-btn .lang-code { display: none; }
  .tab-more-l { display: none; } .tab-more-s { display: inline; }
}
/* ---------- Liquidations ---------- */
.lq-status { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.lq-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 4px; font-size: 12.5px; font-weight: 600; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: var(--text-secondary); }
.lq-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.lq-pill.live { color: var(--up); border-color: rgba(67,184,131,.35); } .lq-pill.live i { background: var(--up); animation: pulse-dot 2s infinite; }
.lq-pill.demo { color: var(--brand); border-color: rgba(255,246,0,.35); } .lq-pill.demo i { background: var(--brand); animation: pulse-dot 2s infinite; }
.lq-pill.off { color: var(--down); border-color: rgba(236,90,64,.35); } .lq-pill.off i { background: var(--down); }
.lq-new { margin-left: 8px; font-size: 11.5px; font-weight: 600; color: var(--brand-ink); background: var(--brand); border-radius: 4px; padding: 2px 8px; cursor: pointer; }
.liq-row { grid-template-columns: 66px minmax(52px, .6fr) minmax(130px, 1.2fr) minmax(70px, .7fr) minmax(80px, .8fr) minmax(110px, 1fr) minmax(110px, 1fr) auto; }
.liq-row.long { border-left: 3px solid rgba(236,90,64,.7); } .liq-row.short { border-left: 3px solid rgba(67,184,131,.65); }
.liq-row.big .feed-usd { color: var(--brand); }
.liq-row.fresh { animation: liq-in .9s ease-out; }
@keyframes liq-in { from { background: rgba(255,246,0,.18); transform: translateY(-6px); opacity: 0; } to { background: rgba(255,255,255,.02); transform: none; opacity: 1; } }
.liq-loss, .liq-margin { font-size: 12.5px; white-space: nowrap; } .liq-loss small, .liq-margin small { color: var(--text-muted); font-size: 11px; margin-right: 3px; }
.src-tag { font-style: normal; font-size: 10.5px; color: var(--text-secondary); border: 1px solid rgba(255,255,255,.18); border-radius: 4px; padding: 0 5px; margin-left: 4px; }
.risk-row { grid-template-columns: minmax(50px, .6fr) auto minmax(64px, .7fr) minmax(90px, 1fr) minmax(90px, 1fr) auto; }
.risk-dist { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.risk-bar { width: 48px; height: 6px; border-radius: 2px; background: rgba(255,255,255,.06); overflow: hidden; } .risk-bar i { display: block; height: 100%; background: #f5b544; }
.risk-dist.hot { color: var(--down); } .risk-dist.hot .risk-bar i { background: var(--down); } .risk-dist.warm { color: #f5b544; }
.badge-soon.beta { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); }
@media (max-width: 640px) {
  .liq-row { grid-template-columns: 1fr auto; grid-template-areas: "m usd" "act px" "loss margin" "time a"; row-gap: 4px; }
  .liq-row .feed-m { grid-area: m; } .liq-row .feed-act { grid-area: act; } .liq-row .feed-usd { grid-area: usd; }
  .liq-row .liq-loss { grid-area: loss; } .liq-row .liq-margin { grid-area: margin; text-align: right; } .liq-row .feed-px { grid-area: px; text-align: right; }
  .liq-row .feed-time { grid-area: time; } .liq-row .feed-a { grid-area: a; justify-self: end; }
  .risk-row { grid-template-columns: auto auto 1fr; grid-template-areas: "m side usd" "liq dist a"; row-gap: 4px; }
  .risk-row .feed-m { grid-area: m; } .risk-row .pf-side { grid-area: side; } .risk-row .feed-usd { grid-area: usd; text-align: right; }
  .risk-row .feed-px { grid-area: liq; } .risk-row .risk-dist { grid-area: dist; } .risk-row .feed-a { grid-area: a; justify-self: end; }
}
@media (prefers-reduced-motion: reduce) { .liq-row.fresh { animation: none; } .lq-pill i { animation: none !important; } }
.liq-side { font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.liq-side.long { color: var(--down); background: rgba(236,90,64,.12); } .liq-side.short { color: var(--up); background: rgba(67,184,131,.12); }
.bias.liq .bias-bar .l { background: var(--down); } .bias.liq .bias-bar .s { background: var(--up); }
.feed-a { white-space: nowrap; }
/* Closed sheets/drawers are fully hidden (not just moved off-screen), so iOS rubber-band
   scrolling or the collapsing Safari toolbar can never reveal them. Visibility switches
   off only after the slide-out finishes. Page overscroll bounce is disabled too. */
html, body { overscroll-behavior-y: none; }
.pf, .qr-drawer { visibility: hidden; }
.pf { transition: transform .26s cubic-bezier(.2,.8,.2,1), visibility 0s linear .26s; }
.qr-drawer { transition: transform .35s cubic-bezier(.2,.8,.2,1), visibility 0s linear .35s; }
.pf.open, .qr-drawer.open { visibility: visible; transition-delay: 0s; }
@media (max-width: 640px) { .pf { transform: translateY(calc(100% + 40px)); } .pf.open { transform: none; } }
@media (prefers-reduced-motion: reduce) { .pf, .qr-drawer { transition: visibility 0s; } }
/* ---------- USDC flows ---------- */
.flow-row { grid-template-columns: 72px minmax(96px, auto) 1fr auto 28px; }
.flow-row.in { border-left: 3px solid rgba(67,184,131,.65); } .flow-row.out { border-left: 3px solid rgba(236,90,64,.65); }
.flow-dir { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 4px; white-space: nowrap; justify-self: start; }
.flow-dir.in { color: var(--up); background: rgba(67,184,131,.12); } .flow-dir.out { color: var(--down); background: rgba(236,90,64,.12); }
.flow-tx { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 5px; color: var(--text-muted); }
.flow-tx svg { width: 14px; height: 14px; } .flow-tx:hover { color: var(--brand); background: rgba(255,246,0,.08); }
@media (max-width: 640px) {
  .flow-row { grid-template-columns: auto 1fr auto; grid-template-areas: "dir usd usd" "time a tx"; row-gap: 4px; }
  .flow-row .flow-dir { grid-area: dir; } .flow-row .feed-usd { grid-area: usd; } .flow-row .feed-time { grid-area: time; }
  .flow-row .feed-a { grid-area: a; justify-self: end; } .flow-row .flow-tx { grid-area: tx; }
}
/* Footer, desktop: one row — "updated" line left, Support right, no dead space below */
.footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 12px 0 14px; line-height: 1.5; }
.foot-sup { margin: 0; justify-content: flex-end; }
@media (min-width: 641px) { .content { padding-bottom: 0; } }
.foot-line { margin: 0; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .content { padding-bottom: 0; }
  .footer { flex-direction: column-reverse; text-align: center; gap: 10px; margin-top: 24px; padding: 16px 0 14px; }   /* phones: Support above the line */
  .foot-sup { justify-content: center; }
}
/* QR sheet above the phone bottom bar so its last lines (disclaimer) stay visible */
.qr-overlay { z-index: 58; } .qr-drawer { z-index: 59; }
@media (max-width: 640px) { .qr-drawer { bottom: calc(10px + env(safe-area-inset-bottom)); max-height: calc(100dvh - 24px); } }
/* Compact KPI boxes: sub-lines read as one sentence (no flex gaps between label and value). */
.kpi-sub { display: block; line-height: 1.45; }
.kpi-sub > span { display: inline-block; margin-right: 12px; } .kpi-sub > span:last-child { margin-right: 0; }
.kpi-sub b { margin-left: 2px; }
/* Phones: KPI boxes two per row, tighter padding and type, so a page shows its numbers at a glance. */
@media (max-width: 640px) {
  .grid.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
  .grid.kpis > .card { padding: 11px 12px; border-radius: 8px; }
  .grid.kpis > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* odd count: last box full width */
  .grid.kpis .kpi-label { font-size: 11.5px; }
  .grid.kpis .kpi-value { font-size: 20px; margin: 4px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .grid.kpis .kpi-sub { font-size: 11px; }
  .grid.kpis .kpi-value .bias-bar { width: 56px; height: 7px; }
  .grid.kpis .kpi-value .bias { gap: 6px; }
}
/* Risk page: top lists */
.risk-lists { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 14px; }
@media (max-width: 640px) {
  .risk-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
  .risk-lists .risk-chart, .risk-lists > .card:last-child:nth-child(even) { grid-column: 1 / -1; }
  .risk-lists > .card { padding: 11px 12px; border-radius: 8px; }
  .risk-lists .card-t { font-size: 12px; }
  .risk-lists table td { padding: 5px 2px; font-size: 12px; }
  .risk-lists .card-h { margin-bottom: 4px; }
}
/* Amps market boosts: a compact list inside the 4th KPI box (boosts are few) */
.boost-kpi { display: flex; flex-direction: column; gap: 8px; }
.boosts { display: grid; gap: 9px; }
.boost { display: grid; gap: 4px; }
.boost.ended { opacity: .5; }
.boost-h { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.boost-x { font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; }
.boost-st { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 4px; border: 1px solid rgba(255,255,255,.14); color: var(--text-secondary); white-space: nowrap; }
.boost-st.live { color: var(--up); border-color: rgba(67,184,131,.35); } .boost-st.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--up); animation: pulse-dot 2s infinite; }
.boost-st.up { color: #f5b544; border-color: rgba(245,181,68,.35); }
.boost-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.07); overflow: hidden; }
.boost-bar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, rgba(255,246,0,.45), var(--brand)); }
.boost-when { font-size: 11.5px; color: var(--text-secondary); }
.boost-dates { color: var(--text-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .boost-dates { display: none; } }
@media (max-width: 640px) { .grid.kpis > .boost-kpi { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .boost-st.live i { animation: none; } }

/* Topbar CTA: the one loud element in the header */
.topnav .cta, .cta { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 7px 7px 12px; border-radius: 6px; font-weight: 700; font-size: 13.5px; letter-spacing: -.005em; color: #0b0b08;
  background: linear-gradient(180deg, #fffb6b 0%, #fff600 45%, #f2d900 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), inset 0 -1px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(255,246,0,.5), 0 6px 22px -6px rgba(255,246,0,.55), 0 0 34px -10px rgba(255,246,0,.6);
  transition: transform .18s ease, box-shadow .18s ease; animation: cta-glow 3.2s ease-in-out infinite; }
.cta::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.75) 50%, transparent 65%); transform: translateX(-120%); animation: cta-shine 4.5s ease-in-out infinite 1.2s; }
.cta-ic { width: 15px; height: 15px; flex: none; }
.cta-ar { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 5px; background: #0b0b08; color: var(--brand); transition: transform .18s ease; }
.cta-ar svg { width: 14px; height: 14px; }
.cta:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -1px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(255,246,0,.7), 0 10px 30px -6px rgba(255,246,0,.7), 0 0 48px -8px rgba(255,246,0,.75); }
.cta:hover .cta-ar { transform: translate(2px, -2px) rotate(0deg); }
.cta:active { transform: translateY(0) scale(.98); }
.cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@keyframes cta-shine { 0% { transform: translateX(-120%); } 30%, 100% { transform: translateX(120%); } }
@keyframes cta-glow { 0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.65), inset 0 -1px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(255,246,0,.5), 0 6px 22px -6px rgba(255,246,0,.55), 0 0 34px -10px rgba(255,246,0,.6); }
  50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.65), inset 0 -1px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(255,246,0,.6), 0 8px 26px -6px rgba(255,246,0,.7), 0 0 44px -8px rgba(255,246,0,.75); } }
.cta:hover { animation: none; }
@media (prefers-reduced-motion: reduce) { .cta, .cta::after { animation: none; } .cta::after { display: none; } }
@media (max-width: 860px) { .topnav .cta { display: none; } } /* phones use the floating QR / trade button */
@media (max-width: 1500px) { .cta-ic { display: none; } .topnav .cta, .cta { padding: 6px 6px 6px 12px; gap: 6px; font-size: 13px; } .cta-ar { width: 22px; height: 22px; border-radius: 5px; } }

/* Price strip: thin marquee above the header, right -> left, pauses on hover */
.ticker { position: relative; overflow: hidden; height: 34px; display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(255,246,0,.035), rgba(0,0,0,0)); font-size: 12.5px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%); }
.ticker[hidden] { display: none; }
.tk-track { display: flex; width: max-content; animation: tk-scroll var(--tk-dur, 60s) linear infinite; will-change: transform; }
.ticker:hover .tk-track, .ticker:focus-within .tk-track { animation-play-state: paused; }
.tk-group { display: flex; flex: none; }
.tk { display: inline-flex; align-items: baseline; gap: 7px; padding: 4px 16px; color: var(--text-secondary); text-decoration: none; white-space: nowrap; border-radius: 4px; position: relative; transition: background .2s; }
.tk + .tk::before, .tk-group + .tk-group .tk:first-child::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 3px; margin-top: -1px; border-radius: 50%; background: rgba(255,255,255,.18); }
.tk b { color: var(--text); font-weight: 600; }
.tk-px { font-variant-numeric: tabular-nums; color: var(--text); opacity: .85; }
.tk-chg { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 11.5px; }
.tk:hover { background: rgba(255,255,255,.05); }
.tk:hover b { color: var(--brand); }
.tk.flash-up { animation: tk-up 1.2s ease-out; } .tk.flash-down { animation: tk-down 1.2s ease-out; }
@keyframes tk-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes tk-up { 0% { background: rgba(67,184,131,.22); } 100% { background: transparent; } }
@keyframes tk-down { 0% { background: rgba(236,90,64,.22); } 100% { background: transparent; } }
@media (max-width: 640px) { .ticker { height: 30px; font-size: 12px; } .tk { padding: 3px 12px; gap: 6px; } }
@media (prefers-reduced-motion: reduce) {
  .tk-track { animation: none; } .tk-group[aria-hidden] { display: none; }
  .ticker { overflow-x: auto; scrollbar-width: none; -webkit-mask-image: none; mask-image: none; } .ticker::-webkit-scrollbar { display: none; }
}

/* Markets: gainer + loser in one KPI box */
.movers { display: flex; flex-direction: column; gap: 6px; }
.mover { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 10px; text-decoration: none; color: inherit; padding: 4px 8px; margin: 0 -8px; border-radius: 5px; transition: background .15s; }
.mover:hover { background: rgba(255,255,255,.05); }
.mover-l { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; min-width: 44px; }
.mover.up .mover-l { color: var(--up); } .mover.down .mover-l { color: var(--down); }
.mover b { font-size: 20px; font-weight: 600; color: var(--text); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mover > span:last-child { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) { .mover { grid-template-columns: 1fr auto; gap: 2px 8px; } .mover-l { grid-column: 1 / -1; min-width: 0; font-size: 10px; } .mover b { font-size: 17px; } }

/* News: bell, top bar, sheet */
.nw-btn { position: relative; }
.nw-btn[hidden] { display: none; }
.nw-dot { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--down); color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px #0b0b08; }
.nw-dot[hidden] { display: none; }
.nw-btn:has(.nw-dot:not([hidden])) svg { animation: nw-ring 2.4s ease-in-out infinite; transform-origin: 50% 15%; }
@keyframes nw-ring { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(14deg); } 82% { transform: rotate(-12deg); } 89% { transform: rotate(6deg); } }

#news-bar:empty { display: none; }
.nw-bar { display: flex; align-items: stretch; margin-bottom: 14px; border-radius: 8px; position: relative; overflow: hidden;
  background: linear-gradient(90deg, rgba(255,246,0,.13), rgba(255,246,0,.04) 60%, rgba(255,255,255,.02)); border: 1px solid rgba(255,246,0,.28); }
.nw-bar::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.nw-bar-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 6px 10px 16px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.nw-new { flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: #0b0b08; background: var(--brand); padding: 3px 7px; border-radius: 4px; animation: pulse-dot 2s infinite; }
.nw-bar-t { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-bar-time { flex: none; font-size: 12px; color: var(--text-muted); }
.nw-bar-go { flex: none; font-size: 13px; font-weight: 600; color: var(--brand); white-space: nowrap; }
.nw-bar-main:hover .nw-bar-t { color: var(--brand); }
.nw-bar-x { flex: none; width: 40px; display: grid; place-items: center; background: none; border: 0; border-left: 1px solid rgba(255,246,0,.12); color: var(--text-muted); cursor: pointer; }
.nw-bar-x svg { width: 16px; height: 16px; } .nw-bar-x:hover { color: var(--text); }

.nw-chip { flex: none; display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: .03em; padding: 2px 8px; border-radius: 4px; border: 1px solid currentColor; white-space: nowrap; }
.nw-chip.c-listing { color: #43b883; } .nw-chip.c-campaign { color: #fff600; } .nw-chip.c-product { color: #6cb6ff; }
.nw-chip.c-ecosystem { color: #c49bff; } .nw-chip.c-event { color: #f5b544; } .nw-chip.c-ama { color: #4fd8d0; } .nw-chip.c-update { color: #a3a39a; }

.nw-follow { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 10px; margin-top: 14px; padding: 11px 14px; border-radius: 8px; text-decoration: none; color: #0b0b08; background: var(--brand); font-size: 14px; font-weight: 600; }
.nw-follow svg { width: 19px; height: 19px; } .nw-follow b { font-weight: 700; opacity: .75; } .nw-follow:hover { filter: brightness(1.06); }
.nw-list { display: grid; gap: 12px; margin-top: 14px; }
.nw-card { position: relative; padding: 14px; border-radius: 8px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,246,0,.09); scroll-margin-top: 10px; }
.nw-card.unread { border-color: rgba(255,246,0,.3); } .nw-card.unread::after { content: ""; position: absolute; top: 16px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.nw-card.focus { box-shadow: 0 0 0 2px rgba(255,246,0,.5); }
.nw-img { display: block; width: calc(100% + 28px); margin: -14px -14px 12px; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 7px 7px 0 0; background: #111; }
.nw-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.nw-card h3 { margin: 8px 0 6px; font-size: 16px; line-height: 1.35; font-weight: 600; padding-right: 14px; }
.nw-text { font-size: 13.5px; line-height: 1.6; color: var(--text-secondary); white-space: pre-line; overflow-wrap: anywhere; max-height: 9.6em; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.nw-text.fits { -webkit-mask-image: none; mask-image: none; }
.nw-card.full .nw-text { max-height: none; -webkit-mask-image: none; mask-image: none; }
.nw-text a { color: var(--brand); } .nw-text code { font-family: "Geist Mono", monospace; font-size: 12.5px; background: rgba(255,255,255,.06); padding: 1px 4px; border-radius: 4px; }
.nw-text .spoiler { background: rgba(255,255,255,.18); color: transparent; border-radius: 3px; } .nw-text .spoiler:hover { color: inherit; background: none; }
.nw-more { margin: 6px 16px 0 0; padding: 0; background: none; border: 0; color: var(--brand); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.nw-more[hidden] { display: none; }
.nw-src { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; font-size: 12.5px; color: var(--text-muted); text-decoration: none; }
.nw-src svg { width: 13px; height: 13px; } .nw-src:hover { color: var(--brand); }
@media (max-width: 640px) {
  .nw-bar-main { gap: 8px; padding: 9px 4px 9px 14px; } .nw-bar-time, .nw-bar-main .nw-chip { display: none; }
  .nw-bar-t { font-size: 13px; } .nw-bar-go { font-size: 12px; } .nw-bar-x { width: 36px; }
  .nw-dot { top: -4px; right: -4px; }
}
@media (prefers-reduced-motion: reduce) { .nw-btn svg, .nw-new { animation: none !important; } }
@media (min-width: 861px) and (max-width: 1500px) { .topnav .tabs .tab { padding-left: 10px; padding-right: 10px; } } /* room for the news bell */

/* News: source badge, Decibel announcement body (paragraphs, lists, tables) */
.nw-src-b { flex: none; display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.nw-src-b svg { width: 11px; height: 11px; stroke-width: 2.4; }
.nw-src-b.dcb { color: #0b0b08; background: var(--brand); } .nw-src-b.tg { color: var(--text-secondary); background: rgba(255,255,255,.07); }
.nw-ended { font-size: 11px; color: var(--text-muted); border: 1px solid var(--border); padding: 1px 6px; border-radius: 4px; }
.nw-seg { margin-top: 14px; } .nw-seg button { flex: 1; }
.nw-text p { margin: 0 0 8px; } .nw-text p:last-child { margin-bottom: 0; }
.nw-text .nw-sum { color: var(--text); font-weight: 500; }
.nw-text ul { margin: 0 0 8px; padding-left: 18px; } .nw-text li { margin: 2px 0; }
.nw-text hr { border: 0; border-top: 1px solid rgba(255,246,0,.1); margin: 10px 0; }
.nw-tbl { overflow-x: auto; margin: 0 0 8px; border: 1px solid var(--border); border-radius: 6px; }
.nw-tbl table { border-collapse: collapse; width: 100%; font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nw-tbl th, .nw-tbl td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--border); }
.nw-tbl th { color: var(--text-muted); font-weight: 500; background: rgba(255,255,255,.03); } .nw-tbl tr:last-child td { border-bottom: 0; }
.nw-card.full .nw-text { white-space: normal; } .nw-card .nw-text:has(> p, > ul, > .nw-tbl) { white-space: normal; }
.nw-chip.c-delisting { color: #ec5a40; } .nw-chip.c-params { color: #f5b544; } .nw-chip.c-community { color: #c49bff; }
@media (max-width: 640px) { .nw-bar-main .nw-src-b { display: none; } }
/* Profile chart: identical layout for PnL and Account Value — title + export on row 1, switches on row 2 */
.pf-card .card-h { flex-wrap: nowrap; align-items: center; margin-bottom: 10px; }
.pf-ctrl { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
@media (max-width: 640px) { .pf-ctrl { justify-content: space-between; } }
.addr-btn.busy, .mbtn.busy { opacity: .55; cursor: progress; }

/* ---- Profile: owner wallet + subaccount tabs (Amps board) ---- */
.pf-owner { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 12px; color: var(--text-muted); }
.pf-owner .pf-full { margin: 0; color: var(--text-secondary); }
.pf-owner .pf-count { margin-left: auto; }
.pf-ico.sm { width: 26px; height: 26px; } .pf-ico.sm svg { width: 13px; height: 13px; }
.pf-subs { display: flex; gap: 2px; margin: 10px 0 2px; padding: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; overflow-x: auto; scrollbar-width: none; }
.pf-subs::-webkit-scrollbar { display: none; }
.pf-sub { flex: 1 0 auto; min-width: 96px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; background: none; border: 0; padding: 6px 10px; border-radius: 4px; color: var(--text-muted); cursor: pointer; text-align: left; }
.pf-sub b { font-size: 12px; font-weight: 600; color: var(--text-secondary); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-sub small { font-family: var(--mono); font-size: 11px; }
.pf-sub:hover b, .pf-sub:hover { color: var(--text-primary); }
.pf-sub.on { background: var(--brand); color: var(--brand-ink); }
.pf-sub.on b, .pf-sub.on small { color: var(--brand-ink); }
.pf-sub.off { opacity: .55; }
.pf-sub:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

/* ---- Markets: live price cells (same flash as the ticker) ---- */
.lv { display: inline-block; padding: 1px 4px; margin: -1px -4px; border-radius: 2px; }
.lv.flash-up { animation: tk-up 1.2s ease-out; } .lv.flash-down { animation: tk-down 1.2s ease-out; }
.mk-tt { display: inline-flex; align-items: center; gap: 10px; }
.mk-tt .lq-pill { padding: 3px 8px; font-size: 11.5px; }
@media (prefers-reduced-motion: reduce) { .lv.flash-up, .lv.flash-down { animation: none; } }

/* ---- Chart controls: pinned top-right next to the export icons, whatever the headline width ---- */
/* The headline block gives way (its sub-line wraps) so the controls never move or break into two lines. */
.card-h:has(> .chart-tools) { flex-wrap: nowrap; align-items: flex-start; }
.card-h:has(> .chart-tools) > :first-child { flex: 1 1 0; min-width: 0; }
.card-h > .chart-tools { order: 98; margin-left: auto; gap: 8px; flex: 0 0 auto; flex-wrap: nowrap; }
.card-h > .chart-tools ~ .exp-tools { margin-left: 0; align-self: flex-start; }
@media (max-width: 860px) {
  /* Phones/tablets: export icons stay on the title row, controls get their own full row. */
  .card-h:has(> .chart-tools) { flex-wrap: wrap; }
  .card-h > .chart-tools { order: 100; flex-basis: 100%; margin-left: 0; flex-wrap: wrap; }
  .card-h > .chart-tools ~ .exp-tools { margin-left: auto; }
  /* Reserve the sub-line's tallest case (3 lines) so the controls row below never shifts between ranges. */
  .hero-chart #hv-sub { min-height: 4.35em; }
}

/* ---- Market logos (data/icons/*.svg from Decibel) and letter-badge fallback ---- */
.mk-ic { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; object-fit: contain; vertical-align: -4px; margin-right: 7px; }
img.mk-ic { background: transparent; }
.mk-ic.mono { display: inline-grid; place-items: center; font: 700 8.5px/1 var(--mono); letter-spacing: -.02em; color: var(--brand); background: rgba(255,246,0,.10); box-shadow: inset 0 0 0 1px rgba(255,246,0,.28); }
.mk-ic.mono.e { color: var(--text-primary); background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.mk-ic.mono.m { color: #fab219; background: rgba(250,178,25,.10); box-shadow: inset 0 0 0 1px rgba(250,178,25,.30); }  /* same amber as .chip.warn */
.mk-link { display: inline-flex; align-items: center; }
.mk-ic.lg { width: 28px; height: 28px; flex-basis: 28px; vertical-align: -6px; margin-right: 10px; }
.mk-ic.lg.mono { font-size: 12px; }
.tk .mk-ic { width: 15px; height: 15px; flex-basis: 15px; margin-right: 6px; vertical-align: -3px; }
.tk .mk-ic.mono { font-size: 7px; }
.mover-n { display: inline-flex; align-items: center; }
.mname .mk-ic, .tk .mk-ic { margin-right: 0; align-self: center; }  /* these rows already use flex gap */

/* ---- Guide page ---- */
.help-btn.on { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); }
.gd { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
/* Section menu: plain list, neon highlight on hover and on the selected item */
.gd-tabs { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 4px; }
.gd-tabs a { position: relative; padding: 9px 14px; border-radius: 5px; border: 1px solid transparent; color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: color .18s, background .18s, border-color .18s, box-shadow .18s, text-shadow .18s; }
.gd-tabs a:hover { color: var(--brand); background: rgba(255,246,0,.07); border-color: rgba(255,246,0,.35);
  box-shadow: 0 0 10px rgba(255,246,0,.22), inset 0 0 10px rgba(255,246,0,.06); text-shadow: 0 0 8px rgba(255,246,0,.45); }
.gd-tabs a.on { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); font-weight: 600; text-shadow: none;
  box-shadow: 0 0 6px rgba(255,246,0,.7), 0 0 18px rgba(255,246,0,.45), 0 0 36px rgba(255,246,0,.2); }
.gd-tabs a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Content: flat, editorial — no boxes; sections separated by hairlines */
.gd-body { min-width: 0; max-width: 780px; color: var(--text-secondary); line-height: 1.75; font-size: 15px; }
.gd-head { padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.gd-head h2 { margin: 0 0 8px; font-size: 26px; font-weight: 600; color: var(--text-primary); letter-spacing: -.01em; }
.gd-head p { margin: 0; font-size: 16px; }
.gd-open { display: inline-block; margin-top: 12px; color: var(--brand); font-weight: 600; text-decoration: none; }
.gd-open:hover { text-decoration: underline; text-underline-offset: 3px; }
.gd-item { padding: 26px 0; border-bottom: 1px solid var(--border); }
.gd-item h3 { margin: 0 0 10px; font-size: 18px; font-weight: 600; color: var(--text-primary); }
.gd-item p { margin: 0 0 10px; } .gd-item ul, .gd-tips ul { margin: 6px 0 10px; padding-left: 20px; } .gd-item li { margin: 4px 0; }
.gd-item b, .gd-tips b { color: var(--text-primary); font-weight: 600; }
.gd-f, .gd-read, .gd-ex, .gd-an { margin-top: 12px; }
.gd-f span, .gd-read > b, .gd-ex > b, .gd-an > b { display: block; margin-bottom: 2px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.gd-f code { font-family: var(--mono); font-size: 14px; color: var(--brand); word-break: break-word; }
.gd-an > b { color: var(--brand); }
.gd-tips { padding: 26px 0 8px; }
.gd-tips h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; color: var(--text-primary); }
.gd-body > .note { margin-top: 18px; }
@media (max-width: 860px) {
  .gd { grid-template-columns: 1fr; gap: 18px; }
  .gd-tabs { position: sticky; top: 0; z-index: 5; flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 8px 2px; background: var(--bg, #0a0a0a); }
  .gd-tabs::-webkit-scrollbar { display: none; }
  .gd-tabs a { padding: 7px 12px; font-size: 13.5px; }
  .gd-body { font-size: 14.5px; }
  .gd-head h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .gd-tabs a { transition: none; } }

/* ---- Sticky footer: short pages still put the footer at the bottom of the screen ---- */
.app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.main { flex: 1 0 auto; display: flex; flex-direction: column; }
.content { flex: 1 0 auto; display: flex; flex-direction: column; }
.content > #page { flex: 1 0 auto; }
.content > .footer { margin-top: auto; }
.content > #page + .footer { margin-top: 28px; }
/* Phones: the body already reserves room for the fixed bottom nav, so the column fills only what is left. */
@media (max-width: 640px) { .app { min-height: calc(100dvh - 68px - env(safe-area-inset-bottom)); } }

/* Profile header: short address with the copy icon beside it */
.pf-id { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pf-copy { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border-radius: 5px; background: none; border: 1px solid transparent; color: var(--text-muted); cursor: pointer; }
.pf-copy svg { width: 15px; height: 15px; }
.pf-copy:hover { color: var(--brand); border-color: rgba(255,246,0,.3); background: rgba(255,246,0,.06); }
@media (max-width: 860px) { .tab-more-l { display: none; } .tab-more-s { display: inline; } }  /* tablets/phones: short "coming next" label */

/* ---------- Telegram alerts (sheet + Amps call-to-action) ---------- */
.al-feat { list-style: none; margin: 14px 0 6px; padding: 0; display: grid; gap: 8px; }
.al-feat li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; font-size: 13.5px; color: var(--text-secondary); }
.al-feat svg { width: 18px; height: 18px; color: var(--brand); }
.al-form { display: grid; gap: 10px; margin-top: 12px; }
.al-row { display: grid; grid-template-columns: 1fr 150px auto; gap: 8px; align-items: center; }
.al-row .input { min-width: 0; width: 100%; font-family: "Geist Mono", ui-monospace, monospace; font-size: 12.5px; }
.al-row .al-label { font-family: inherit; }
.al-row .pf-ico svg { width: 16px; height: 16px; }
@media (max-width: 560px) { .al-row { grid-template-columns: 1fr auto; } .al-row [name=a] { grid-column: 1 / -1; } .al-row .al-label { grid-column: 1; } }
.al-add { display: inline-flex; align-items: center; gap: 6px; justify-self: start; background: none; border: 1px dashed rgba(255,246,0,.3); color: var(--text-secondary); border-radius: 6px; padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.al-add:hover { color: var(--brand); border-color: var(--brand); } .al-add svg { width: 15px; height: 15px; }
.al-hint { margin: 0; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.al-err { margin: 0; padding: 9px 12px; border-radius: 6px; background: rgba(236,90,64,.08); border: 1px solid rgba(236,90,64,.3); color: #ff8a92; font-size: 13px; }
.al-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border: 0; border-radius: 6px; background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.al-submit:disabled { opacity: .6; cursor: wait; } .al-submit svg { width: 17px; height: 17px; }
.al-privacy { display: grid; grid-template-columns: 22px 1fr; gap: 10px; margin-top: 16px; padding: 11px 13px; border-radius: 8px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,246,0,.10); }
.al-privacy svg { width: 20px; height: 20px; color: var(--brand); } .al-privacy p { margin: 0; font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }
.al-steps { margin: 14px 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--text-secondary); }
.al-tg { display: flex; align-items: center; justify-content: center; gap: 9px; height: 48px; border-radius: 8px; background: #2aabee; color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; }
.al-tg svg { width: 20px; height: 20px; } .al-tg:hover { filter: brightness(1.08); }
.al-qr { display: none; text-align: center; margin-top: 14px; } .al-qr .qr-frame { width: 180px; margin: 0 auto; }
.al-qr p { margin: 8px 0 0; font-size: 12.5px; color: var(--text-muted); }
@media (min-width: 761px) { .al-qr { display: block; } }
.al-exp { text-align: center; font-size: 12.5px; color: var(--text-muted); margin: 10px 0 0; }
.al-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.al-list code { color: var(--text-primary); } .al-sub { color: var(--text-muted); font-size: 12px; }
.al-back { width: 100%; margin-top: 14px; }
.al-cta { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: center; margin-bottom: 14px; border-color: rgba(255,246,0,.22); background: linear-gradient(90deg, rgba(255,246,0,.06), transparent 60%); }
.al-cta-ic { width: 30px; height: 30px; color: var(--brand); }
.al-cta-t { display: grid; gap: 2px; } .al-cta-t b { font-size: 15px; } .al-cta-t span { font-size: 13px; color: var(--text-muted); }
.al-cta-btn { padding: 0 16px; white-space: nowrap; }
@media (max-width: 560px) { .al-cta { grid-template-columns: 28px 1fr; } .al-cta-btn { grid-column: 1 / -1; width: 100%; } .al-cta-ic { width: 24px; height: 24px; } }
