:root {
  --bg: #0c0c0e;
  --surface: #141416;
  --surface-2: #1a1a1e;
  --line: #2a2a32;
  --line-soft: #1e1e24;
  --text: #f4f4f5;
  --muted: #9b9ba3;
  --faint: #6b6b75;
  --brand: #2ee6b5;
  --brand-2: #5b9cf6;
  --brand-soft: rgba(46, 230, 181, 0.12);
  --buy: #22c55e;
  --buy-soft: rgba(34, 197, 94, 0.12);
  --sell: #f05252;
  --sell-soft: rgba(240, 82, 82, 0.12);
  --swap: #5b9cf6;
  --swap-soft: rgba(91, 156, 246, 0.12);
  --warn: #f5b041;
  --radius: 16px;
  --sidebar: 232px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--sans); }
body { min-height: 100vh; padding-bottom: 76px; }
body.shell { background: var(--bg); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.up { color: var(--buy); }
.down { color: var(--sell); }

/* ---------- sidebar (desktop) ---------- */
.sidebar {
  display: none;
  flex-direction: column; gap: 18px;
  width: var(--sidebar); padding: 20px 14px 18px;
  border-right: 1px solid var(--line-soft); background: #0a0a0c;
}
.side-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px; font-weight: 700; letter-spacing: -0.02em;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--brand), #1a8f72);
}
.logo-mark svg { display: block; }
.side-brand-text { display: grid; gap: 1px; min-width: 0; }
.side-brand-text small {
  display: block; font-weight: 500; font-size: 10.5px; color: var(--faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px;
}
.side-nav { display: grid; gap: 4px; }
.side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  color: var(--muted); font-weight: 600; font-size: 14px;
}
.side-link svg { width: 18px; height: 18px; flex: none; opacity: 0.85; }
.side-link:hover { color: var(--text); background: var(--surface-2); }
.side-link.on {
  color: var(--brand); background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(46, 230, 181, 0.22);
}
.side-link.on svg { opacity: 1; }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.side-cta {
  padding: 12px; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(46, 230, 181, 0.1), transparent 70%), var(--surface);
  font-size: 12px; color: var(--muted); line-height: 1.35;
}
.status {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 0 4px; font-size: 12px; color: var(--muted);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 rgba(46, 230, 181, 0.55); animation: pulse 2s infinite; flex: none; }
.status.late .pulse { background: var(--warn); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(46, 230, 181, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 230, 181, 0); } }
.status .status-next { display: none; width: 100%; padding-left: 16px; font-size: 11.5px; color: var(--faint); }

/* barra in basso, solo telefono */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(2, 1fr);
  background: rgba(12, 12, 14, 0.94); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 11.5px; font-weight: 600; color: var(--faint); border-radius: 10px; }
.tabbar a.on { color: var(--brand); }
.tabbar svg { width: 21px; height: 21px; }

/* ---------- shell layout ---------- */
@media (min-width: 900px) {
  body.shell {
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    min-height: 100vh; padding-bottom: 0;
  }
  body.shell .sidebar { display: flex; grid-row: 1 / span 2; position: sticky; top: 0; height: 100vh; }
  body.shell main { grid-column: 2; max-width: none; width: 100%; }
  body.shell footer { grid-column: 2; max-width: none; width: 100%; }
  body.shell .tabbar { display: none; }
  .status .status-next { display: block; }
}

/* ---------- impaginazione ---------- */
main { max-width: 1200px; margin: 0 auto; padding: 18px 14px 32px; }
.page-head { margin: 4px 2px 16px; }
.page-head h1 { margin: 0; font-size: 24px; letter-spacing: -0.03em; font-weight: 750; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.card, .panel {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
}
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px 10px; }
.card-head h2 { margin: 0; font-size: 15px; letter-spacing: -0.01em; }
.card-head .note { width: 100%; margin: 0; font-size: 12.5px; color: var(--muted); }
.live-card { min-height: 0; }
.grid { display: grid; gap: 14px; }
.grid > *, .hero > * { min-width: 0; }

/* ---------- hero home ---------- */
.hero {
  position: relative; overflow: hidden;
  display: grid; gap: 22px; margin-bottom: 16px; padding: 26px 20px 22px;
  border: 1px solid var(--line-soft); border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(ellipse 80% 80% at 100% 0%, rgba(46, 230, 181, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 70% at 0% 100%, rgba(91, 156, 246, 0.1), transparent 50%),
    var(--surface);
}
.hero-main { position: relative; z-index: 1; }
.hero-kicker, .hero-label {
  margin: 0; font-size: 12px; font-weight: 650; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.hero-title {
  margin: 10px 0 0; max-width: 18ch;
  font-size: clamp(1.85rem, 6vw, 3rem); font-weight: 780;
  letter-spacing: -0.045em; line-height: 1.08;
}
.hero-title .grad {
  display: inline;
  background: linear-gradient(100deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-value {
  margin: 8px 0 0; font-size: clamp(2rem, 8vw, 3.15rem); font-weight: 700;
  letter-spacing: -0.045em; line-height: 1.05;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-value.pulse-in { animation: value-in 0.55s ease-out; }
@keyframes value-in {
  from { opacity: 0.35; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.hero-meta {
  margin: 12px 0 0; max-width: 38rem;
  font-size: 14px; line-height: 1.5; color: var(--muted);
}
.hero-stats { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stat {
  display: block; min-width: 180px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(12, 12, 14, 0.45);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
a.hero-stat:hover {
  border-color: rgba(46, 230, 181, 0.45); background: var(--brand-soft); transform: translateY(-1px);
}
.hero-stat-bar.big { margin-top: 14px; max-width: 320px; }
.chart-wrap { position: relative; padding: 8px 12px 14px; }
.chart-wrap.chart-live { touch-action: none; }
.chart { width: 100%; height: auto; display: block; }
.chart-label { fill: var(--faint); font-size: 11px; font-family: var(--mono); }
.chart-guide { stroke: rgba(46, 230, 181, 0.35); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; pointer-events: none; }
.chart-dot { fill: #2ee6b5; stroke: #0c0c0e; stroke-width: 2; opacity: 0; pointer-events: none; }
.chart-dot.total-dot { fill: #e8b86d; }
.chart-hit { fill: transparent; cursor: crosshair; touch-action: none; }
.chart-tip {
  position: absolute; z-index: 5; min-width: 140px; max-width: 220px;
  padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(16, 18, 22, 0.96); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-size: 12.5px; line-height: 1.35; pointer-events: none;
}
.chart-tip .tip-time { color: var(--muted); font-size: 11.5px; margin-bottom: 4px; }
.chart-tip .tip-main { font-weight: 700; color: var(--brand); font-family: var(--mono); font-size: 15px; }
.chart-tip .tip-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 3px; color: var(--muted); }
.chart-tip .tip-row b { color: var(--text); font-weight: 650; font-family: var(--mono); }
.chart-tip .tip-row b.total { color: #e8b86d; }
.chart-legend {
  display: flex; flex-wrap: wrap; gap: 12px 18px; padding: 2px 8px 8px;
  font-size: 12px; color: var(--muted);
}
.chart-legend i {
  display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px;
  vertical-align: middle;
}
.chart-legend .lg-pct { background: #2ee6b5; }
.chart-legend .lg-total { background: #e8b86d; }
.chart-label.right { fill: #e8b86d; opacity: 0.85; }
.chart-foot {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 0 8px; font-size: 12.5px; color: var(--muted);
}
.chart-note {
  margin: 0 8px 8px; font-size: 12.5px; color: var(--warn);
}
.card-head .seg { margin-left: auto; }
.hero-stat-label {
  display: block; font-size: 11.5px; font-weight: 650; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.hero-stat-value {
  display: block; margin-top: 4px; font-size: 28px; font-weight: 750;
  letter-spacing: -0.03em; color: var(--brand);
}
.hero-stat-bar {
  margin-top: 10px; height: 6px; border-radius: 999px; overflow: hidden; background: var(--line);
}
.hero-stat-bar span {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 0.45s ease;
}
.hero-stat-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--faint); }
.hero-compact { align-items: stretch; }
.venue-buttons {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr; gap: 8px; align-content: end;
}
.venue-btn {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(12, 12, 14, 0.55);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.venue-btn strong { font-size: 14px; letter-spacing: -0.01em; }
.venue-btn span { font-size: 12px; color: var(--muted); }
.venue-btn:hover { border-color: #3a3a46; background: rgba(46, 230, 181, 0.06); transform: translateY(-1px); }
.venue-btn.on { border-color: transparent; box-shadow: inset 0 0 0 1px rgba(46, 230, 181, 0.45); background: var(--brand-soft); }
.wallet-link { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 650; }
.wallet-link:hover .tok-sym { color: var(--brand); }
.rank-panel { margin-top: 14px; }
.venue-tag {
  display: inline-block; margin: 0 4px 0 0; padding: 2px 7px; border-radius: 6px;
  font-size: 11.5px; font-weight: 650; color: var(--brand); background: var(--brand-soft);
}
.crumb { margin: 0 0 6px; font-size: 13px; }
.crumb a { color: var(--muted); font-weight: 600; }
.crumb a:hover { color: var(--text); }
.wallet-address { word-break: break-all; font-size: 13px; color: var(--muted); }
.hero-flow { position: relative; z-index: 1; display: grid; gap: 10px; }
.hero-flow-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.hero-flow-label {
  font-size: 12px; font-weight: 650; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.split { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--line); }
.split span { display: block; height: 100%; transition: width 0.45s ease; }
.split-legend { display: flex; gap: 14px; font-size: 13px; font-weight: 600; }

/* ---------- feed live ---------- */
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.chip {
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: 5px 11px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.chip:hover { color: var(--text); }
.chip.on { color: var(--bg); border-color: transparent; background: var(--brand); }
.chip.on::before { content: ""; }
.chip.plain.on::before { content: ""; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sell); animation: pulse-red 1.6s infinite; }
.live-dot.brand { background: var(--brand); animation: pulse 2s infinite; }
@keyframes pulse-red { 50% { opacity: 0.35; } }
.live-count { padding: 0 16px 8px; font-size: 12.5px; color: var(--muted); }
.live-count b { color: var(--text); font-family: var(--mono); }
.feed { max-height: 560px; overflow-y: auto; border-top: 1px solid var(--line-soft); }
.tx {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center;
  padding: 11px 16px; border-bottom: 1px solid var(--line-soft);
}
.tx:last-child { border-bottom: 0; }
.tx.fresh { animation: fresh 6s ease-out; }
@keyframes fresh { 0% { background: rgba(46, 230, 181, 0.16); } 100% { background: transparent; } }
.badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 70px;
  padding: 3px 8px; border-radius: 7px; font-size: 12px; font-weight: 700;
}
.badge.buy { color: var(--buy); background: var(--buy-soft); }
.badge.sell { color: var(--sell); background: var(--sell-soft); }
.badge.swap { color: var(--swap); background: var(--swap-soft); }
.badge.in, .badge.out, .badge.other { color: var(--muted); background: var(--surface-2); }
.tx-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tx-tokens { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; min-width: 0; }
.tx-meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.tx-meta a:hover { color: var(--text); }
.tx-meta .wallet { color: var(--swap); font-weight: 600; }
.tx-usd { text-align: right; font-weight: 650; }
.tx-usd a { display: block; font-size: 11.5px; font-weight: 500; color: var(--faint); font-family: var(--sans); }
.tx-usd a:hover { color: var(--text); }
.more { display: none; }
.m-only { display: none; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- token ---------- */
.tok { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-weight: 600; }
.tok:hover .tok-sym { color: var(--brand); }
.tok-sym { white-space: nowrap; }
.tok-amt { color: var(--muted); font-weight: 500; }
.logo-dot {
  position: relative; flex: none; display: inline-grid; place-items: center; overflow: hidden;
  width: 22px; height: 22px; border-radius: 50%; font-size: 10.5px; font-weight: 700; color: #0b0f14;
}
.logo-dot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.logo-dot.lg { width: 30px; height: 30px; font-size: 13px; }
.logo-dot.xl { width: 48px; height: 48px; font-size: 18px; }
.token-head .token-title { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.token-head .token-title h1 { margin: 0; font-size: 28px; letter-spacing: -0.03em; }
.token-head .token-title .muted { margin: 2px 0 0; }
.token-warnings { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; min-height: 0; }
.token-warnings:empty { display: none; }
.token-kpis {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px;
}
.token-kpi .hero-stat-value { font-size: 1.35rem; }
.up { color: var(--buy); }
.down { color: var(--sell); }
@media (min-width: 720px) {
  .token-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.tag { font-size: 10.5px; font-weight: 700; padding: 1px 5px; border-radius: 5px; }
.tag.ok { color: var(--brand); background: var(--brand-soft); }
.tag.warn { color: var(--warn); background: rgba(245, 176, 65, 0.12); }
.tok-name { display: block; font-size: 12px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }

/* ---------- flussi ---------- */
.flows { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line-soft); }
.flow-col { padding: 10px 16px 14px; }
.flow-col h3 { margin: 4px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.flow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 7px 0; }
.flow .bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--line-soft); overflow: hidden; }
.flow .bar span { display: block; height: 100%; border-radius: 2px; }
.flow .sub { font-size: 11.5px; color: var(--muted); font-weight: 500; margin-left: 6px; }

/* ---------- composizione ---------- */
.composition { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; padding: 8px 16px 16px; border-top: 1px solid var(--line-soft); }
.donut { width: 120px; height: 120px; }
.donut text { fill: var(--text); font-family: var(--mono); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; min-width: 0; }
.legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- classifica ---------- */
.filters { display: grid; gap: 10px; padding: 14px 16px; }
.search {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); padding: 10px 12px 10px 36px; font: inherit; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238794a3' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center;
}
.search:focus { border-color: #2c3a4a; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; overflow-x: auto; max-width: 100%; }
.seg button { border: 0; background: transparent; padding: 6px 11px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--brand); color: var(--bg); }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line-soft); }
table.rank { width: 100%; border-collapse: collapse; font-size: 14px; }
table.rank th {
  position: sticky; top: 0; background: var(--surface); text-align: right; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 650;
  padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.rank td { text-align: right; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
table.rank th.l, table.rank td.l { text-align: left; }
table.rank tr:hover td { background: rgba(255, 255, 255, 0.015); }
table.rank td.rk { color: var(--faint); width: 36px; }
.share { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.share i { width: 44px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; display: inline-block; }
.share i b { display: block; height: 100%; background: var(--brand); }
.col-m { display: none; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }
.pager button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 9px; padding: 7px 12px; font-weight: 600; cursor: pointer; }
.pager button:disabled { opacity: 0.35; cursor: default; }
.help { cursor: help; border-bottom: 1px dotted var(--faint); }

footer {
  max-width: 1200px; margin: 0 auto; padding: 8px 18px 26px;
  color: var(--faint); font-size: 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.error-bar { display: none; margin-bottom: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(245, 176, 65, 0.1); color: var(--warn); font-size: 13px; }
.error-bar.show { display: block; }
.skeleton { color: transparent !important; background: linear-gradient(90deg, var(--surface-2), #24242c, var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- da tablet in su ---------- */
@media (min-width: 760px) {
  main { padding: 28px 28px 40px; }
  .page-head h1 { font-size: 30px; }
  .hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.95fr);
    align-items: end; gap: 28px; padding: 32px 32px 28px; margin-bottom: 18px;
  }
  .hero-compact { align-items: center; }
  .venue-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  main > .venue-buttons { margin: 0 0 14px; }
  .hero-value { font-size: clamp(2.4rem, 4vw, 3.4rem); }
  .flows { grid-template-columns: 1fr 1fr; }
  .flow-col + .flow-col { border-left: 1px solid var(--line-soft); }
  .composition { grid-template-columns: 140px 1fr; gap: 16px; }
  .donut { width: 140px; height: 140px; }
  .filters { grid-template-columns: minmax(240px, 1fr) auto; align-items: center; }
  .filter-row { grid-column: 1 / -1; }
  .col-m { display: table-cell; }
}
@media (min-width: 1100px) {
  .home { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
  .home .side { display: grid; gap: 14px; }
  .feed { max-height: 760px; }
  .flows { grid-template-columns: 1fr; }
  .flow-col + .flow-col { border-left: 0; border-top: 1px solid var(--line-soft); }
}
@media (max-width: 759px) {
  .hero { padding: 20px 16px 16px; gap: 18px; }
  .hero-title { max-width: none; }
  .hero-meta { font-size: 13px; }
  .feed { max-height: none; overflow: visible; }
  .more { display: block; width: calc(100% - 32px); margin: 10px 16px 14px; padding: 9px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; font-size: 13.5px; cursor: pointer; }
  .tx { padding: 10px 14px; gap: 4px 10px; }
  .badge { min-width: 62px; font-size: 11.5px; }
  .rank-hide-m { display: none; }
  .m-only { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
  table.rank td, table.rank th { padding: 10px 10px; }
  table.rank td.rk { padding-right: 0; width: 26px; }
  .tok-name { max-width: 120px; }
  .composition { grid-template-columns: 100px 1fr; gap: 12px; }
  .donut { width: 100px; height: 100px; }
}

/* ---------- mappa ---------- */
.map-filters { display: grid; gap: 12px; padding: 14px 16px; }
.map-field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.map-field b { color: var(--text); }
.map-field input[type=range] { width: 100%; accent-color: var(--brand); }
.map-field select { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; font: inherit; max-width: 140px; }
.map-box { position: relative; border-top: 1px solid var(--line-soft); }
.map-frame { display: block; width: 100%; height: 72vh; min-height: 460px; max-height: 820px; border: 0; background: transparent; }
.map-empty[hidden] { display: none; }
.map-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.map-hint { margin: 0; padding: 10px 16px 14px; font-size: 12px; color: var(--faint); border-top: 1px solid var(--line-soft); }
@media (min-width: 760px) {
  .map-filters { grid-template-columns: minmax(220px, 1.4fr) auto; align-items: end; }
  .map-filters .filter-row { grid-column: 1 / -1; }
}
