* { box-sizing: border-box; }

:root {
  --strip-h: 54px; /* approx: 40px min-height + 7px*2 padding */
  --page-bg: #f7f8fb;
  --text: #111827;
  --text-muted: rgba(17, 24, 39, 0.62);
  --text-primary: var(--text);
  --text-tertiary: var(--text-muted);
  --accent-gold: #f5c45c;
  --text-soft: rgba(17, 24, 39, 0.55);
  --card: #ffffff;
  --stroke: rgba(17, 24, 39, 0.08);
  --stroke-strong: rgba(17, 24, 39, 0.12);
  --topbar-bg: #fde7c8;
  --out-bg: rgba(17, 24, 39, 0.02);
  --input-bg: #ffffff;
  --strip-bg: #eef2ff;
  --strip-border: rgba(37, 99, 235, 0.14);
  --chg-up: #067647;
  --chg-dn: #b42318;
  --fee-accent: #2563eb;
  --sb-ico-bg: rgba(17, 24, 39, 0.04);
  --sb-ico-fg: rgba(17, 24, 39, 0.75);
  --active-nav-bg: rgba(255, 207, 102, 0.22);
  --active-nav-border: rgba(255, 207, 102, 0.55);
  --api-link: #2563eb;
  --hero-sub: rgba(17, 24, 39, 0.7);
}

[data-theme="dark"] {
  --page-bg: #090a0e;
  --text: #e8eaef;
  --text-muted: rgba(232, 234, 239, 0.58);
  --text-primary: var(--text);
  --text-tertiary: var(--text-muted);
  --text-soft: rgba(232, 234, 239, 0.48);
  --card: #12131a;
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-strong: rgba(255, 255, 255, 0.14);
  --topbar-bg: #221c14;
  --out-bg: rgba(0, 0, 0, 0.28);
  --input-bg: #1a1b24;
  --strip-bg: #0f111d;
  --strip-border: rgba(99, 102, 241, 0.28);
  --chg-up: #34d399;
  --chg-dn: #f87171;
  --fee-accent: #60a5fa;
  --sb-ico-bg: rgba(255, 255, 255, 0.06);
  --sb-ico-fg: rgba(232, 234, 239, 0.75);
  --active-nav-bg: rgba(255, 207, 102, 0.12);
  --active-nav-border: rgba(255, 207, 102, 0.32);
  --api-link: #60a5fa;
  --hero-sub: rgba(232, 234, 239, 0.68);
}

html, body { height: 100%; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--page-bg);
  color: var(--text);
}
/* Desktop app-shell: main column scrolls, sidebar stays pinned */
@media (min-width: 901px) {
  body {
    overflow: hidden;
  }
}

/* ONARA-style starfield — dark theme only (canvas + transparent body so stars show through) */
.starfield-canvas {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
[data-theme="dark"] html {
  background-color: #080910;
}
[data-theme="dark"] body {
  background: transparent;
}
[data-theme="dark"] .starfield-canvas {
  display: block;
}
[data-theme="dark"] .app {
  position: relative;
  z-index: 1;
}

/* Surreal light orange dunes — light theme only */
.light-dunes-canvas {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] html {
  background-color: #ffffff;
}
[data-theme="light"] body {
  background: transparent;
}
[data-theme="light"] .light-dunes-canvas {
  display: block;
}
[data-theme="light"] .app {
  position: relative;
  z-index: 1;
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

/* DOGEOS-style spot price strip (Binance / CoinGecko public APIs) */
.price-strip {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 7px 12px 7px 16px;
  background: var(--strip-bg);
  border-bottom: 1px solid var(--strip-border);
  font-size: 13px;
  color: var(--text);
}
.price-strip-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 14px;
  min-width: 0;
  flex: 1;
}
.strip-part {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.strip-label {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.strip-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.strip-chg {
  font-weight: 700;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.strip-chg.up { color: var(--chg-up); }
.strip-chg.down { color: var(--chg-dn); }
.strip-chg.flat { color: var(--text-muted); }
.strip-sep {
  width: 1px;
  height: 18px;
  background: var(--stroke-strong);
  flex-shrink: 0;
}
.strip-fee-val {
  font-weight: 700;
  color: var(--fee-accent);
  font-variant-numeric: tabular-nums;
}
.strip-src {
  margin-left: auto;
  text-decoration: none;
  white-space: nowrap;
}
.strip-home-link {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--fee-accent);
}
.strip-home-link:hover {
  text-decoration: underline;
  color: var(--fee-accent);
}
@media (max-width: 640px) {
  .strip-home-link { font-size: 11px; }
}
/* Theme toggle — same symbols as drc20 Header (☾ in light = go dark, ☼ in dark = go light) */
.theme-toggle {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  color: var(--text);
  flex-shrink: 0;
  padding: 0;
}
.theme-toggle:hover {
  opacity: 0.7;
}
.strip-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.strip-theme {
  /* desktop strip: keep hit target inside bar */
  width: 38px;
  height: 38px;
  font-size: 20px;
}
/* Compact connect — top strip (desktop) + mobile bottom bar */
.connect-wallet-btn--strip {
  padding: 0 14px;
  min-height: 34px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.app {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: 260px 1fr;
}

/* —— Site footer (full grid width): professional structure, very shibe voice —— */
.site-footer {
  grid-column: 1 / -1;
  margin-top: 8px;
  border-top: 1px solid var(--stroke-strong);
  background: linear-gradient(180deg, rgba(255, 207, 102, 0.08) 0%, var(--card) 22%, var(--card) 100%);
  box-shadow: 0 -8px 32px rgba(17, 24, 39, 0.04);
}
[data-theme="dark"] .site-footer {
  background: linear-gradient(180deg, rgba(255, 207, 102, 0.06) 0%, var(--card) 24%, var(--card) 100%);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
}
.site-footer-inner {
  max-width: none;
  margin: 0;
  padding: 28px 18px 22px;
  display: grid;
  grid-template-columns: minmax(200px, 1.15fr) repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
  align-items: start;
}
@media (max-width: 960px) {
  .site-footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
  }
}
.site-footer-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.site-footer-moon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(251, 191, 36, 0.35));
  transform: rotate(-8deg);
}
.site-footer-brand-title {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fee-accent);
  margin-bottom: 8px;
}
.site-footer-brand-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 42ch;
}
.site-footer-heading {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 12px;
}
.site-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.site-footer-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-footer-links a:hover {
  color: var(--fee-accent);
  border-bottom-color: rgba(37, 99, 235, 0.35);
}
[data-theme="dark"] .site-footer-links a:hover {
  border-bottom-color: rgba(96, 165, 250, 0.4);
}
.site-footer-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.04em;
}
.site-footer-static {
  font-size: 12px;
  color: var(--text-muted);
}
.site-footer-mono {
  font-size: 12px;
  word-break: break-all;
}
.site-footer-quip {
  font-size: 12px;
  font-style: italic;
  color: var(--text-soft);
  line-height: 1.45;
  margin-top: 4px;
}
.site-footer-bar {
  max-width: none;
  margin: 0;
  padding: 14px 18px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  border-top: 1px dashed var(--stroke-strong);
}
.site-footer-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  min-width: 0;
}
.site-footer-donate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke-strong);
  background: var(--out-bg);
}
.site-footer-donate-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fee-accent);
}
.site-footer-donate-addr {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  max-width: min(340px, 70vw);
  word-break: break-all;
  line-height: 1.35;
}
.site-footer-donate-btn {
  cursor: pointer;
  border: 1px solid var(--stroke-strong);
  background: linear-gradient(160deg, #fbbf24 0%, #d97706 100%);
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 999px;
  transition: filter 0.15s ease, transform 0.12s ease;
}
.site-footer-donate-btn:hover {
  filter: brightness(1.06);
}
.site-footer-donate-btn:active {
  transform: scale(0.97);
}
@media (max-width: 900px) {
  .site-footer {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px) + 8px);
  }
}

/* Sidebar */
.sidebar {
  background: var(--card);
  border-right: 1px solid var(--stroke);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-desktop {
  position: sticky;
  top: var(--strip-h);
  height: calc(100vh - var(--strip-h));
  align-self: start;
  overflow: auto;
}

.sb-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
}
.sb-logo-img {
  width: 52px;
  height: 52px;
  border-radius: 0;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.sb-nav { display: flex; flex-direction: column; gap: 6px; }
.sb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
}
.sb-item-btn {
  width: 100%;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.sb-item-btn:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.28);
  outline-offset: 2px;
}
.sb-item:hover { background: var(--sb-ico-bg); }
.sb-item.active {
  background: var(--active-nav-bg);
  border-color: var(--active-nav-border);
}
.sb-ico {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--sb-ico-bg);
  color: var(--sb-ico-fg);
  font-size: 12px;
}
.sb-ico--svg {
  font-size: 0;
  line-height: 0;
}
.sb-ico--svg svg {
  width: 16px;
  height: 16px;
  display: block;
}
.sb-item.active .sb-ico {
  color: var(--text);
}

.sb-foot { margin-top: auto; }
.sb-pill {
  border: 1px solid var(--stroke);
  background: var(--out-bg);
  padding: 10px 12px;
  border-radius: 14px;
}
.sb-pill-title { font-size: 12px; color: var(--text-muted); }
.sb-pill-sub { font-size: 12px; margin-top: 4px; }

/* Main — min-width:0 so grid 1fr column can shrink (prevents mobile horizontal overflow) */
.main {
  padding: 18px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 901px) {
  .app {
    height: calc(100vh - var(--strip-h));
  }
  .main {
    height: calc(100vh - var(--strip-h));
    overflow-y: auto;
    overflow-x: hidden;
  }
}

.topbar {
  background: var(--topbar-bg);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.topbar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar-head .hero {
  flex: 1;
  min-width: min(100%, 200px);
}

.connect-wallet-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: #111827;
  color: #ffffff;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  appearance: none;
}
.connect-wallet-btn:hover {
  filter: brightness(1.06);
}
[data-theme="dark"] .connect-wallet-btn {
  background: linear-gradient(160deg, #fbbf24 0%, #d97706 100%);
  color: #111827;
  border-color: rgba(251, 191, 36, 0.45);
}

.hero-title { font-size: 18px; font-weight: 800; }
.hero-sub { font-size: 13px; color: var(--hero-sub); margin-top: 2px; }

.search-wrap {
  position: relative;
  min-width: 0;
}
.search { display: flex; gap: 10px; }
.search-input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke-strong);
  background: var(--input-bg);
  color: var(--text);
  outline: none;
}
.search-input:focus { border-color: rgba(99,102,241,0.55); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.search-btn {
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke-strong);
  background: #111827;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
[data-theme="dark"] .search-btn {
  background: #fbbf24;
  color: #111827;
  border-color: rgba(251, 191, 36, 0.5);
}
.search-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.section {
  margin-top: 16px;
  min-width: 0;
  max-width: 100%;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 1100px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 10; border-right: none; border-bottom: 1px solid var(--stroke); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  /* Stack Recent blocks + Latest activity (same breakpoint as .panels JSON row) */
  .dash-split {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 18px;
  }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .stats {
    grid-template-columns: 1fr;
  }
  .dogemap-gallery-outer {
    mask-image: none;
    -webkit-mask-image: none;
    margin: 0;
    padding: 0;
  }
  .dogemap-gallery-scroll {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: y proximity;
    gap: 14px;
    padding: 8px 0 16px;
    max-height: none;
  }
  .dogemap-card {
    width: 100%;
    max-width: 100%;
    scroll-snap-align: start;
  }
  .api-form {
    grid-template-columns: 1fr;
  }
}

.stat {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 12px 12px;
}
.stat-k { font-size: 12px; color: var(--text-soft); }
.stat-v { margin-top: 6px; font-size: 15px; font-weight: 800; }
.stat-v.bad { color: #b42318; }
.stat-v.ok { color: #067647; }
.stat-v.warn { color: #b54708; }

/* Blockscout-style dashboard (Dogecoin / Doginals / DRC-20 — indexer data only) */
.dash-lead {
  margin: 14px 0 16px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 920px;
}
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.dash-kpi {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  min-width: 0;
}
[data-theme="dark"] .dash-kpi {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.dash-kpi-k {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.dash-kpi-v {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.dash-kpi-hint {
  overflow-wrap: anywhere;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.35;
}

.dash-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
}

/* Mobile/tablet: stack Recent blocks + Latest activity */
@media (max-width: 1100px) {
  .dash-split {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.dash-panel {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}
.dash-panel-head {
  padding: 14px 16px 10px 16px;
  border-bottom: 1px solid var(--stroke);
  background: var(--out-bg);
}
.dash-panel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}
.dash-panel-sub {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.dash-scroll {
  flex: 1;
  overflow: auto;
  max-height: 420px;
  padding: 8px 0;
  min-width: 0;
}

/* JSON preview + Wallet UTXO panels — same chrome as Recent blocks / Latest activity (dash-panel) */
.dash-scroll--json {
  padding: 0;
  -webkit-overflow-scrolling: touch;
  background: var(--out-bg);
}
.dash-panel--json pre.out--in-dash,
.dash-scroll--json pre.out {
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 200px;
  max-height: min(52vh, 480px);
  height: auto;
  padding: 12px 16px 16px 16px;
  border: none;
  border-radius: 0;
  border-top: 1px solid var(--stroke);
  background: var(--out-bg);
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  box-shadow: none;
}
@media (max-width: 900px) {
  .dash-panel--json pre.out--in-dash,
  .dash-scroll--json pre.out {
    max-height: min(60vh, 420px);
    font-size: 11px;
  }
}

.dash-block-row {
  padding: 10px 16px;
  border-bottom: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-block-row:last-child { border-bottom: none; }
.dash-block-h {
  font-weight: 800;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.dash-block-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.dash-feed-row {
  padding: 10px 16px;
  border-bottom: 1px solid var(--stroke);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
}
.dash-feed-row:last-child { border-bottom: none; }
.dash-feed-row:hover { background: var(--out-bg); }
.dash-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
  margin-top: 2px;
}
.dash-badge--ins {
  background: rgba(139, 92, 246, 0.18);
  color: #6d28d9;
}
[data-theme="dark"] .dash-badge--ins {
  background: rgba(167, 139, 250, 0.2);
  color: #c4b5fd;
}
.dash-badge--drc {
  background: rgba(245, 158, 11, 0.2);
  color: #b45309;
}
[data-theme="dark"] .dash-badge--drc {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
}
.dash-feed-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}
.dash-feed-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.dash-feed-meta button.tx-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--fee-accent);
  cursor: pointer;
  text-decoration: underline;
  text-align: left;
}
.dash-feed-meta button.tx-link:hover {
  color: var(--text);
}
.dash-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-soft);
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Activity chart (canvas) */
.dash-chart-wrap {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 14px 16px 10px 16px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
[data-theme="dark"] .dash-chart-wrap {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.dash-chart-head { margin-bottom: 8px; }
.dash-chart-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}
.dash-chart-sub {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.4;
}
.dash-chart-canvas-wrap {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#activityChart {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  min-height: 200px;
  box-sizing: border-box;
}

/* Dogemap — horizontal gallery (doggy.market–style cards, gold mosaic, no commerce) */
.dogemap-hero {
  margin-bottom: 22px;
  padding: 0;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: var(--card);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
[data-theme="dark"] .dogemap-hero {
  background: var(--card);
}
.dogemap-hero-head {
  padding: 14px 16px 10px 16px;
  border-bottom: 1px solid var(--stroke);
  background: var(--out-bg);
}
.dogemap-hero-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
[data-theme="dark"] .dogemap-hero-title {
  color: var(--text);
}
.dogemap-hero-sub {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.dogemap-stats {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-soft);
}

.dogemap-gallery-outer {
  position: relative;
  margin: 0;
  padding: 0;
  mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
}
.dogemap-gallery-scroll {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 12px 14px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: transparent transparent;
  scrollbar-width: none; /* Firefox */
}
.dogemap-gallery-scroll::-webkit-scrollbar { display: none; }

.dogemap-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--stroke);
  background: var(--out-bg);
}
.dogemap-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--card);
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}
.dogemap-nav-btn:active { opacity: 0.85; }
.dogemap-nav-hint {
  font-size: 12px;
  color: var(--text-soft);
}
.dogemap-gallery-scroll::-webkit-scrollbar {
  height: 8px;
}
.dogemap-gallery-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(180, 140, 40, 0.5), rgba(212, 175, 55, 0.75));
  border-radius: 999px;
}
.dogemap-gallery-scroll > .dash-empty {
  flex: 1 1 auto;
  min-width: min(100%, 320px);
  align-self: center;
}

.dogemap-card {
  flex: 0 0 auto;
  width: 304px;
  scroll-snap-align: start;
  border-radius: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  transition: none;
  cursor: pointer;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  display: block;
  position: relative;
  box-shadow: none;
}
.dogemap-card:hover {
  /* Keep card static on hover (no lift, no extra shadow). */
  box-shadow: none;
}
[data-theme="dark"] .dogemap-card {
  background: transparent;
  box-shadow: none;
}
[data-theme="dark"] .dogemap-card:hover {
  /* Keep card static on hover (no lift, no extra shadow). */
  box-shadow: none;
}

/* Soft inner glass highlight */
.dogemap-card::before {
  content: none;
}

.dogemap-mosaic {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 3px;
  aspect-ratio: 1 / 1.05;
  padding: 10px 10px 4px 10px;
  /* No tinted backdrop behind the tiles */
  background: transparent;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  border-radius: 18px;
}
[data-theme="light"] .dogemap-mosaic {
  background: transparent;
}
[data-theme="dark"] .dogemap-mosaic {
  background: transparent;
}

.dogemap-tile {
  border-radius: 2px;
  min-height: 0;
  min-width: 0;
  background: linear-gradient(135deg, #e8b02a 0%, #f4c23d 45%, #d4a017 100%);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.65),
    inset 0 -3px 6px rgba(96, 62, 6, 0.38),
    inset 0 -1px 2px rgba(180, 130, 28, 0.22),
    0 0 7px rgba(212, 165, 48, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition: filter 0.3s ease, box-shadow 0.3s ease;
}
.dogemap-card:hover .dogemap-tile {
  filter: brightness(1.1) saturate(1.06);
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.88),
    inset 0 -3px 5px rgba(82, 52, 4, 0.34),
    inset 0 -1px 2px rgba(168, 118, 22, 0.28),
    0 0 12px rgba(230, 185, 72, 0.38);
}
.dogemap-tile--0 {
  background: linear-gradient(145deg, #fff8e1 0%, #d4af37 55%, #9a7200 100%);
}
.dogemap-tile--1 {
  background: linear-gradient(145deg, #f5e6b3 0%, #c9a227 50%, #8b6210 100%);
}
.dogemap-tile--2 {
  background: linear-gradient(160deg, #e8c547 0%, #b8860b 70%, #7a5810 100%);
}
.dogemap-tile--3 {
  background: linear-gradient(135deg, #f0d878 0%, #daa520 45%, #8a6a08 100%);
}
.dogemap-tile--4 {
  background: linear-gradient(155deg, #ffeaa7 0%, #cdaa3d 55%, #6d520a 100%);
}
.dogemap-tile--5 {
  background: linear-gradient(140deg, #fcf4d4 0%, #e8c547 40%, #8f6e14 100%);
}

.dogemap-card-label {
  padding: 4px 6px 6px;
  font-family: ui-monospace, monospace;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #c9a227;
  text-align: center;
  line-height: 1.2;
  border-top: 0;
}
[data-theme="dark"] .dogemap-card-label {
  color: #f0d878;
}

.dogemap-card-sub {
  padding: 5px 10px 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--muted, #6b6b6b);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
[data-theme="dark"] .dogemap-card-sub {
  color: #a89f8a;
}

.dogemap-meta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.dogemap-meta-icon {
  display: inline-block;
  font-size: 1.42em;
  line-height: 1;
  vertical-align: -0.08em;
}
.dogemap-meta strong {
  font-variant-numeric: tabular-nums;
  font-size: 1.14em;
  font-weight: 800;
}

.panels {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
}
.panels--json .dash-panel--json {
  min-height: 280px;
  margin: 0;
}
@media (max-width: 1100px) {
  .panels {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.panel {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 14px 14px;
}
.panel .out {
  /* Match dash panels’ “contained list” feel a bit more */
  background: var(--card);
  border-color: var(--stroke-strong);
}
.panel-h { font-size: 14px; font-weight: 800; }
.panel-sub { margin-top: 6px; font-size: 12px; color: var(--text-soft); }

/* Quantum — soft warm card (stands out from default panels) */
.quantum-card.panel {
  background: linear-gradient(165deg, #fff9f4 0%, #fff2e6 55%, #ffead9 100%);
  border-color: rgba(234, 119, 34, 0.22);
  box-shadow: 0 12px 32px rgba(180, 83, 9, 0.07);
}
[data-theme="dark"] .quantum-card.panel {
  background: linear-gradient(165deg, #221a14 0%, #18120e 55%, #14100c 100%);
  border-color: rgba(251, 146, 60, 0.2);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}
.quantum-card__title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}
.quantum-card__host {
  margin: 6px 0 0 0;
  font-size: 13px;
  font-weight: 600;
}
.quantum-card__host a {
  color: #c2410c;
  text-decoration: none;
}
.quantum-card__host a:hover {
  text-decoration: underline;
}
[data-theme="dark"] .quantum-card__host a {
  color: #fdba74;
}
.quantum-card__h {
  margin-top: 18px;
  color: #9a3412;
}
[data-theme="dark"] .quantum-card__h {
  color: #fed7aa;
}
.quantum-card__host + .quantum-card__p {
  margin-top: 12px;
}

.out {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--out-bg);
  color: var(--text);
  overflow: auto;
  min-height: 140px;
  max-height: 520px;
  font-size: 12px;
  line-height: 1.35;
}

.note { margin: 10px 0 0 0; color: var(--text-muted); font-size: 13px; }
.links-row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--stroke-strong);
  background: var(--out-bg);
  padding: 8px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-size: 12px;
}
.chip:hover { background: var(--sb-ico-bg); }
.chip.chip--soon {
  cursor: default;
  opacity: 0.78;
  color: var(--text-muted);
}
.chip.chip--soon:hover {
  background: var(--out-bg);
}

/* Developers — right-side slide-in panel (desktop + mobile) */
.dev-panel-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, 0.45);
}
.dev-panel-backdrop.is-open { display: block; }
.dev-panel {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 92vw);
  z-index: 410;
  background: var(--card);
  border-left: 1px solid var(--stroke-strong);
  transform: translateX(calc(100% + 24px));
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -18px 0 60px rgba(0, 0, 0, 0.22);
  min-height: 0;
}
.dev-panel.is-open { transform: translateX(0); }
.dev-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--stroke);
  background: linear-gradient(160deg, rgba(255, 207, 102, 0.16) 0%, var(--card) 55%, var(--card) 100%);
}
[data-theme="dark"] .dev-panel-top {
  background: linear-gradient(160deg, rgba(120, 90, 20, 0.22) 0%, var(--card) 55%, var(--card) 100%);
}
.dev-panel-top-text { min-width: 0; }
.dev-panel-title {
  margin: 4px 0 8px 0;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
}
.dev-panel-sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}
.dev-panel-close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--stroke-strong);
  background: var(--out-bg);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.dev-panel-close:hover { background: var(--sb-ico-bg); }
.dev-panel-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}
.dev-panel-body .dev-access-footnote { margin-top: 14px; }
.dev-panel-body .dev-access-toast { margin-top: 14px; }

@media (max-width: 900px) {
  .mobile-drawer-item-btn {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    font: inherit;
    cursor: pointer;
  }
}
.dev-access-kicker {
  margin: 0 0 8px 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fee-accent);
}
.dev-access-title {
  margin: 0 0 10px 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}
.dev-access-lead {
  margin: 0 0 22px 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 640px;
}
.dev-access-lead a {
  color: var(--fee-accent);
  font-weight: 700;
  text-decoration: none;
}
.dev-access-lead a:hover {
  text-decoration: underline;
}
.dev-access-form {
  margin: 0;
}
.dev-access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
@media (max-width: 640px) {
  .dev-access-grid {
    grid-template-columns: 1fr;
  }
  .dev-field-span2 {
    grid-column: 1 / -1;
  }
}
.dev-field-span2 {
  grid-column: 1 / -1;
}
.dev-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dev-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.dev-req {
  color: #b45309;
  font-weight: 900;
}
[data-theme="dark"] .dev-req {
  color: #fcd34d;
}
.dev-input,
.dev-textarea,
.dev-select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke-strong);
  background: var(--input-bg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dev-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.45;
}
.dev-input:focus,
.dev-textarea:focus,
.dev-select:focus {
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.dev-select {
  cursor: pointer;
}
.dev-access-footnote {
  margin: 18px 0 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-soft);
}
.dev-access-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.dev-submit {
  border: none;
  cursor: pointer;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #111827;
  background: linear-gradient(160deg, #fbbf24 0%, #d97706 100%);
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.25);
  transition: filter 0.15s ease, transform 0.12s ease;
}
.dev-submit:hover {
  filter: brightness(1.05);
}
.dev-submit:active {
  transform: scale(0.98);
}
[data-theme="dark"] .dev-submit {
  color: #111827;
}
.dev-access-toast {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  background: var(--out-bg);
  border: 1px solid var(--stroke);
  color: var(--text);
}

/* API documentation (explorer-style grouped list) */
.section-api { margin-top: 20px; }
.api-page-head { margin-bottom: 14px; padding: 0 2px; }
.api-page-title {
  margin: 0 0 6px 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.api-page-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 820px;
}

.api-list { display: flex; flex-direction: column; gap: 0; }
.api-group {
  margin-bottom: 22px;
  background: var(--card);
  border: 1px solid var(--stroke-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(17,24,39,0.04);
}
[data-theme="dark"] .api-group {
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
.api-group-title {
  margin: 0;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: var(--out-bg);
  border-bottom: 1px solid var(--stroke);
}

.api-item { border-bottom: 1px solid var(--stroke); background: var(--card); }
.api-item:last-child { border-bottom: none; }

.api-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.api-head:hover { background: var(--out-bg); }

.api-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }

.api-method {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 6px;
  padding: 5px 9px;
  min-width: 46px;
  text-align: center;
  color: #fff;
}
.api-method.api-get { background: #2563eb; }
.api-method.api-post { background: #059669; }

.api-path {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.api-desc {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.api-chev {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-muted);
  transition: transform 0.18s ease;
  transform: rotate(-90deg);
  line-height: 1;
  width: 22px;
  text-align: center;
}
.api-item.open .api-chev { transform: rotate(0deg); }

.api-body { display: none; padding: 0 14px 14px 14px; }
.api-item.open .api-body { display: block; }

.api-body-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}
.api-try {
  border: 1px solid rgba(17,24,39,0.12);
  background: #111827;
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.api-try:disabled { opacity: 0.55; cursor: not-allowed; }
.api-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--api-link);
  text-decoration: none;
}
.api-link:hover { text-decoration: underline; }

.api-detail {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

.api-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 12px; }
.api-input,
.api-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke-strong);
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  font-size: 12px;
}
.api-textarea {
  min-height: 88px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.api-input:focus,
.api-textarea:focus {
  border-color: rgba(37,99,235,0.55);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
  background: var(--card);
}
[data-theme="dark"] .api-input:focus,
[data-theme="dark"] .api-textarea:focus {
  border-color: rgba(96,165,250,0.55);
  box-shadow: 0 0 0 3px rgba(96,165,250,0.12);
}

.api-code { margin-top: 12px; font-size: 12px; max-height: 360px; }

/* Live search suggestions (desktop: under search; mobile: sheet above bottom bar) */
.search-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 160;
  border-radius: 14px;
  border: 1px solid var(--stroke-strong);
  background: var(--card);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
  max-height: min(320px, 48vh);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
[data-theme="dark"] .search-suggest {
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.55);
}
.search-suggest-row {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid var(--stroke);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  display: block;
}
.search-suggest-row:last-child {
  border-bottom: none;
}
.search-suggest-row:hover,
.search-suggest-row:focus-visible {
  background: var(--out-bg);
}
.search-suggest-k {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.search-suggest-v {
  margin-top: 4px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  word-break: break-all;
  color: var(--text-soft);
}
.search-suggest-hint {
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* —— Mobile: bottom toolbar + slide-up menu (75vh sheet) —— */
.mobile-bottom-nav,
.mobile-drawer,
.mobile-drawer-backdrop,
.search-suggest-mobile {
  display: none;
}

@media (max-width: 900px) {
  html,
  body {
    overflow-x: hidden;
    max-width: 100%;
  }
  .app {
    overflow-x: hidden;
    max-width: 100%;
  }
  .strip-desktop {
    display: none !important;
  }
  .sidebar-desktop {
    display: none !important;
  }
  .topbar .search-wrap {
    display: none !important;
  }
  .dash-kpis {
    grid-template-columns: 1fr;
  }
  .main {
    padding: 12px 12px calc(72px + env(safe-area-inset-bottom, 0px));
    max-width: 100%;
    box-sizing: border-box;
  }
  #activityChart {
    max-width: 100%;
    height: auto;
  }

  .mobile-bottom-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 302;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) 12px;
    background: var(--strip-bg);
    border-top: 1px solid var(--strip-border);
    min-height: 64px;
  }

  .mobile-menu-btn {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    border: 1px solid var(--stroke-strong);
    background: var(--card);
    padding: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-menu-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
  }

  .mobile-bottom-center {
    flex: 1;
    min-width: 0;
  }
  .mobile-search-input {
    width: 100%;
    padding: 14px 14px;
    border-radius: 14px;
    border: 1px solid var(--stroke-strong);
    background: var(--input-bg);
    color: var(--text);
    font-size: 15px;
    outline: none;
  }
  .mobile-search-input:focus {
    border-color: rgba(99, 102, 241, 0.55);
  }

  .mobile-bottom-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .mobile-bottom-nav .theme-toggle,
  .mobile-bottom-nav .theme-toggle--mobile-bar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 24px;
  }

  .search-suggest-mobile:not([hidden]) {
    display: block;
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px) + 6px);
    z-index: 305;
    max-height: min(42vh, 300px);
  }

  #searchSuggest {
    display: none !important;
  }

  .mobile-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 310;
    background: rgba(0, 0, 0, 0.45);
  }
  .mobile-drawer-backdrop.is-open {
    display: block;
  }

  .mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-height: 75vh;
    height: auto;
    z-index: 320;
    background: var(--card);
    border-right: none;
    border-top: 1px solid var(--stroke-strong);
    border-radius: 20px 20px 0 0;
    transform: translateY(calc(100% + 24px));
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.22);
    min-height: 0;
  }
  .mobile-drawer.is-open {
    transform: translateY(0);
  }

  .mobile-drawer-handle {
    width: 40px;
    height: 5px;
    border-radius: 999px;
    background: var(--stroke-strong);
    margin: 10px auto 4px;
    flex-shrink: 0;
    opacity: 0.85;
  }

  .mobile-drawer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 14px;
    border-bottom: 1px solid var(--stroke);
    flex-shrink: 0;
  }
  .mobile-drawer-top-logo {
    border-radius: 12px;
    border: 1px solid var(--stroke-strong);
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.1);
    display: block;
  }
  .mobile-drawer-close {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: var(--out-bg);
    color: var(--text);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
  }
  .mobile-drawer-nav {
    display: flex;
    flex-direction: column;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 6px;
    overflow: auto;
    flex: 1;
    min-height: 0;
  }
  .mobile-drawer-connect {
    margin-top: 10px;
    text-align: center;
    font-weight: 800;
    font-size: 16px;
    padding: 16px 14px;
    border-radius: 14px;
    background: linear-gradient(160deg, #fbbf24 0%, #d97706 100%);
    color: #111827;
    border: 1px solid rgba(251, 191, 36, 0.45);
  }
  [data-theme="light"] .mobile-drawer-connect {
    background: #111827;
    color: #fff;
    border-color: rgba(17, 24, 39, 0.14);
  }
  .mobile-drawer-item {
    padding: 16px 14px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 17px;
    border: 1px solid transparent;
  }
  .mobile-drawer-item:not(.mobile-drawer-connect) {
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .mobile-drawer-ico {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--sb-ico-bg);
    color: var(--sb-ico-fg);
  }
  .mobile-drawer-ico svg {
    width: 20px;
    height: 20px;
    display: block;
  }
  .mobile-drawer-item:hover,
  .mobile-drawer-item:focus-visible {
    background: var(--sb-ico-bg);
  }
}
