/* Oddtopus design tokens (from oddtopus.xyz) */
:root {
  --brand: #5b21b6;
  --brand-hover: #4c1d95;
  --brand-soft: #f3edff;
  --brand-line: #ded3ef;
  --brand-focus: #6d28d9;
  --ink: #252a31;
  --muted: #727a87;
  --line: #e9eaed;
  --surface: #f5f6f8;
  --bg: #ffffff;
  --green: #138357;
  --green-soft: #eaf6f0;
  --red: #b94150;
  --red-soft: #fbeef0;
  --blue: #255ce8;
  --amber: #e08a1e;
  --pm: #255ce8;
  --ks: #0f766e;
  --radius: 12px;
  --radius-sm: 8px;
  --s1: #10b981;
  --s2: #3b82f6;
  --s3: #8b5cf6;
  --s4: #f59e0b;
  --chart-grid: #e7e8eb;
  --chart-ref: #b9bec7;
  --chart-axis: #8a919c;
  --map-ocean: #f4f7fb;
  --map-land: #e6e9ee;
  --map-border: #ffffff;
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; }
h1, h2, h3, p { margin: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--brand-focus); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.up { color: var(--green); }
.down { color: var(--red); }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.header-row { display: flex; align-items: center; gap: 22px; height: 74px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; flex: none; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.search { position: relative; flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--radius-sm); padding: 0 12px; height: 44px; }
.search svg { fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.search input { border: 0; background: transparent; outline: none; font: inherit; font-size: 15px; flex: 1; min-width: 0; color: var(--ink); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font: 12px Inter, sans-serif; color: var(--muted); border: 1px solid #d7d9de; border-radius: 4px; padding: 1px 6px; background: #fff; }
.search-results { position: absolute; top: 50px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(24, 33, 46, 0.12); padding: 6px; z-index: 40; }
.search-results a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); }
.search-results a:hover, .search-results a.active { background: var(--surface); }
.search-results .sr-title { flex: 1; font-weight: 550; }
.search-results .empty { padding: 12px; color: var(--muted); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.freshness { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.freshness .dot, .live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.freshness.stale .dot { background: var(--amber); box-shadow: 0 0 0 3px #fdf1e2; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background 0.15s, border-color 0.15s; }
.btn-ghost { background: #fff; border-color: var(--line); }
.btn-ghost:hover { border-color: #cfd2d8; }
.btn-brand { background: var(--brand); color: #fff; font-weight: 650; }
.btn-brand:hover { background: var(--brand-hover); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-buy { flex-direction: column; height: auto; padding: 10px 16px; gap: 2px; }
.btn-buy small { font-weight: 500; font-size: 12px; opacity: 0.85; }

.tabs { display: flex; gap: 28px; height: 46px; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.tabs a { display: flex; align-items: center; color: var(--muted); font-weight: 650; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--brand); border-color: var(--brand); }

/* Ticker */
.ticker { border-bottom: 1px solid var(--line); overflow: hidden; white-space: nowrap; height: 40px; display: flex; align-items: center; background: #fff; }
.ticker:empty { display: none; }
.ticker-track { display: inline-flex; gap: 36px; padding-left: 24px; animation: ticker 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker a { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; }
.ticker a b { font-weight: 600; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* Page */
main { padding-top: 28px; padding-bottom: 64px; min-height: 60vh; outline: none; }
.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.page-head p { color: var(--muted); margin-top: 6px; font-size: 15px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid transparent; background: #fff; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; }
.chip:hover { color: var(--ink); background: var(--surface); }
.chip.active { color: var(--brand); background: var(--brand-soft); border-color: var(--brand); }
.chip .count { font-weight: 500; opacity: 0.7; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.toolbar .left, .toolbar .right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.select { height: 32px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: 0 10px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.seg { display: inline-flex; background: var(--surface); border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 10px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }

/* Cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 20px; }
.card-brand { border-color: var(--brand-line); background: linear-gradient(180deg, #faf7ff 0%, #fff 60%); }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.section-head a.more { color: var(--brand); font-weight: 600; font-size: 13px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--green); background: var(--green-soft); padding: 3px 8px; border-radius: 999px; }
.label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

/* Market card */
.mcard { display: flex; flex-direction: column; padding: 16px 16px 12px; transition: border-color 0.15s, box-shadow 0.15s; min-height: 236px; }
.mcard:hover { border-color: var(--brand-line); box-shadow: 0 6px 20px rgba(91, 33, 182, 0.07); }
.mcard-top { display: flex; gap: 12px; align-items: flex-start; }
.mcard-title { font-size: 15px; font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mcard-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.avatar { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface); display: grid; place-items: center; font-weight: 700; color: var(--brand); font-size: 15px; }
.avatar-lg { width: 64px; height: 64px; border-radius: 14px; font-size: 24px; }
.avatar-sm { width: 28px; height: 28px; border-radius: 7px; font-size: 12px; }
.outcomes { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.orow { display: grid; grid-template-columns: minmax(0, 1fr) 64px 48px; align-items: center; gap: 10px; font-size: 13px; }
.orow .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.orow .pct { text-align: right; font-weight: 650; font-size: 14px; }
.orow svg { width: 64px; height: 22px; }
.mcard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.more-out { font-size: 12px; color: var(--muted); }
.venues { display: inline-flex; gap: 4px; }
.venue { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.venue::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.venue.polymarket { color: var(--pm); border-color: #cfdcfb; background: #f3f6fe; }
.venue.kalshi { color: var(--ks); border-color: #c4e3df; background: #effaf8; }
.venue.both { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }

/* Hero */
.hero-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.featured { padding: 22px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; }
.featured h2 { font-size: 21px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; }
.featured .meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.cmp-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 13px; }
.cmp-table th { padding-left: 10px !important; text-align: right; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding: 0 0 8px; }
.cmp-table th:first-child, .cmp-table td:first-child { text-align: left; }
.cmp-table td { text-align: right; padding: 9px 0; border-top: 1px solid var(--line); white-space: nowrap; }
.cmp-table td:first-child { font-weight: 550; white-space: normal; padding-right: 8px; }
.cmp-table td.best { font-weight: 700; }
.cmp-table .best-cell { display: inline-flex; align-items: center; gap: 6px; }
.cmp-table .na { color: #b9bec7; }
.price-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 26px; padding: 0 8px; border-radius: 6px; font-weight: 650; font-size: 13px; background: var(--surface); }
.price-pill.best { background: var(--green-soft); color: var(--green); }
.callout { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--brand-soft); color: var(--brand-hover); font-size: 13px; }
.callout b { font-weight: 700; }
.side-stack { display: flex; flex-direction: column; gap: 16px; }
.mini { padding: 16px 18px; }
.mini h3 { font-size: 14px; font-weight: 650; display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.mini-row:first-of-type { border-top: 0; }
.mini-row .t { flex: 1; min-width: 0; }
.mini-row .t div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-row .t small { color: var(--muted); font-size: 12px; }

/* Lists */
.list { display: flex; flex-direction: column; }
.list-row { display: grid; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
a.list-row:hover { background: #fcfbff; }
.arb-row { grid-template-columns: 70px minmax(0, 1fr) auto; }
.roi { font-size: 16px; font-weight: 700; color: var(--green); }
.roi small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; }
.legs { display: flex; gap: 6px; }
.leg { display: flex; flex-direction: column; align-items: center; padding: 4px 10px; border-radius: 6px; font-size: 12px; min-width: 64px; }
.leg b { font-size: 13px; }
.leg.yes { background: var(--green-soft); color: var(--green); }
.leg.no { background: var(--red-soft); color: var(--red); }
.leg small { font-size: 10px; font-weight: 600; opacity: 0.8; }
.row-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 13px; }
.list-foot a { color: var(--brand); font-weight: 600; }

.trade-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
.trade-text { font-size: 13px; }
.trade-text b { font-weight: 650; }
.side-buy { color: var(--green); font-weight: 650; }
.side-sell { color: var(--red); font-weight: 650; }
.trade-right { text-align: right; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.trade-right a { color: var(--brand); font-weight: 600; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fcfcfd; }
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover td { background: #fcfbff; }
table.data .r { text-align: right; }

/* Event page */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a:hover { color: var(--brand); }
.event-head { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.event-head h1 { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.event-head .meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 6px; align-items: center; }
.event-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.chart-card { padding: 18px 18px 10px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart { width: 100%; height: 260px; margin-top: 8px; position: relative; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { font-size: 11px; fill: var(--muted); }
.chart-empty { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 13px; background: var(--surface); border-radius: var(--radius-sm); }
.venue-links { display: flex; flex-direction: column; gap: 10px; }
.venue-link { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 600; }
.venue-link:hover { border-color: var(--brand-line); background: #fcfbff; }
.venue-link small { color: var(--muted); font-weight: 500; }
.rules { font-size: 13px; color: #4a515c; white-space: pre-line; line-height: 1.6; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat .label { margin-bottom: 4px; }
.stat b { font-size: 17px; font-weight: 650; }

/* Compare */
.bar-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; min-width: 160px; }
.bar { height: 22px; background: var(--surface); border-radius: 5px; position: relative; overflow: hidden; font-size: 11px; font-weight: 650; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 5px; opacity: 0.18; }
.bar span { position: relative; padding-left: 7px; line-height: 22px; }
.bar.pm { color: var(--pm); } .bar.pm i { background: var(--pm); }
.bar.ks { color: var(--ks); } .bar.ks i { background: var(--ks); }
.gap-badge { font-weight: 700; font-size: 13px; color: var(--amber); }

/* How it works */
.prose { max-width: 760px; }
.prose h2 { font-size: 19px; font-weight: 650; margin: 28px 0 8px; }
.prose p, .prose li { font-size: 15px; color: #3d434c; line-height: 1.65; }
.prose ul { padding-left: 20px; }
.formula { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface); padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; }

/* States */
.empty-state { padding: 48px 20px; text-align: center; color: var(--muted); }
.sk { background: linear-gradient(90deg, #f1f2f4 0%, #f7f8f9 50%, #f1f2f4 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); }
.sk-h1 { height: 32px; width: 40%; margin-bottom: 18px; }
.sk-block { height: 280px; }
.sk-card { height: 236px; }
@keyframes sk { to { background-position: -200% 0; } }
.load-more { display: flex; justify-content: center; margin-top: 20px; }
.error { padding: 40px; text-align: center; }

.tooltip { position: fixed; z-index: 60; pointer-events: none; background: #18212e; color: #fff; font-size: 12px; padding: 8px 10px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); line-height: 1.5; }
.tooltip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 32px 0; }
.footer-row { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-row p { color: var(--muted); max-width: 520px; margin-top: 6px; font-size: 13px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; font-weight: 600; font-size: 13px; color: var(--muted); }
.footer-links a:hover { color: var(--brand); }

/* Responsive */
@media (max-width: 1040px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid, .event-grid { grid-template-columns: 1fr; }
  .side-stack { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .header-row { height: auto; flex-wrap: wrap; padding: 12px 0; gap: 12px; }
  .brand { font-size: 19px; }
  .brand img { width: 36px; height: 36px; }
  .search { order: 3; max-width: none; flex-basis: 100%; height: 40px; }
  .search kbd, .hide-sm, .freshness { display: none; }
  .grid, .grid-2, .side-stack { grid-template-columns: 1fr; }
  .featured { grid-template-columns: 1fr; padding: 16px; }
  .page-head h1, .event-head h1 { font-size: 22px; }
  .arb-row { grid-template-columns: 56px minmax(0, 1fr); }
  .arb-row .legs { grid-column: 1 / -1; }
  .trade-row { grid-template-columns: 32px minmax(0, 1fr); }
  .trade-row .trade-right { grid-column: 2; align-items: flex-start; flex-direction: row; gap: 10px; }
  .list-row { padding: 12px 14px; }
  .stat-row { grid-template-columns: repeat(3, 1fr); }
  .tabs { gap: 20px; }
}

/* ---------- Demo balance (header) ---------- */
.balance { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; margin-right: 4px; }
.balance-label { font-size: 11px; font-weight: 600; color: var(--muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balance b { font-size: 16px; font-weight: 700; }
.balance-total { font-size: 11px; color: var(--muted); }

/* ---------- Pinned BTC 5m ---------- */
.btc-card { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 24px; padding: 22px; margin-bottom: 16px; }
.btc-title { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.btc-title h2 { font-size: 21px; font-weight: 650; letter-spacing: -0.02em; }
.btc-icon { width: 40px; height: 40px; border-radius: 10px; background: #f7931a; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 20px; }
.btc-when { font-size: 12px; margin-top: 6px; }
.btc-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 28px; margin-top: 18px; }
.btc-stats b { font-size: 20px; font-weight: 650; display: block; margin-top: 4px; }
.btc-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.btc-btn { height: 46px; border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: 650; font-size: 15px; cursor: pointer; transition: filter 0.15s; }
.btc-btn span { font-weight: 600; opacity: 0.8; margin-left: 4px; }
.btc-btn.up { background: var(--green-soft); color: var(--green); border-color: #cfe9dd; }
.btc-btn.down { background: var(--red-soft); color: var(--red); border-color: #f1d3d8; }
.btc-btn:hover { filter: brightness(0.97); }
.btc-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btc-mine { font-size: 13px; margin-top: 12px; }
.btc-mine:empty { display: none; }
.btc-prev { margin-top: 10px; }
.btc-right { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.btc-chart { height: 230px; margin-top: 0; }
.small { font-size: 12px; }

/* ---------- Yes / No demo buttons ---------- */
.yn { display: inline-flex; gap: 6px; }
.yn-btn { height: 30px; padding: 0 10px; border-radius: 6px; border: 1px solid transparent; font-weight: 650; font-size: 12px; cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; }
.yn-btn.yes { background: var(--green-soft); color: var(--green); }
.yn-btn.no { background: var(--red-soft); color: var(--red); }
.yn-btn:hover { filter: brightness(0.96); }
.hero-trade .yn { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 10px; margin-top: 8px; }
.hero-trade .yn-btn { height: 44px; font-size: 14px; }
.ext-link { display: inline-block; margin-top: 10px; font-size: 12px; color: var(--brand); font-weight: 600; }

/* ---------- Modal / ticket / auth ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(24, 33, 46, 0.42); z-index: 80; display: grid; place-items: center; padding: 16px; animation: fade 0.12s ease-out; }
.modal { position: relative; width: 100%; max-width: 420px; padding: 24px; box-shadow: 0 24px 64px rgba(24, 33, 46, 0.25); max-height: calc(100vh - 32px); overflow-y: auto; }
.modal h2 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; background: transparent; font-size: 22px; color: var(--muted); cursor: pointer; border-radius: 8px; }
.modal-x:hover { background: var(--surface); }
.modal-head { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; padding-right: 24px; }
.modal-head p { font-size: 13px; margin-top: 2px; }
@keyframes fade { from { opacity: 0; } }
.ticket-head { padding-right: 24px; margin-bottom: 16px; }
.ticket-head h2 { margin-top: 6px; }
.ticket-head p { margin-top: 4px; font-size: 13px; }
.side-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.side-btn { height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; font-weight: 650; font-size: 14px; cursor: pointer; color: var(--muted); }
.side-btn.yes.active, .side-btn.up.active { background: var(--green); border-color: var(--green); color: #fff; }
.side-btn.no.active, .side-btn.down.active { background: var(--red); border-color: var(--red); color: #fff; }
.field-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 12px; font: inherit; font-size: 15px; color: var(--ink); background: #fff; outline: none; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.code-input { font-size: 24px; letter-spacing: 10px; text-align: center; font-weight: 650; }
.amount-row { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding-left: 12px; font-size: 18px; font-weight: 650; }
.amount-row:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.amount-row .input { border: 0; box-shadow: none !important; font-size: 18px; font-weight: 650; padding-left: 0; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 14px; }
.quick .chip { height: 30px; padding: 0 10px; background: var(--surface); color: var(--ink); }
.ticket-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; padding: 14px; background: var(--surface); border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 13px; }
.ticket-summary div { display: flex; flex-direction: column; gap: 2px; }
.ticket-summary b { font-size: 15px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form .small { margin: 2px 0 0; }
.btn-link { border: 0; background: none; color: var(--brand); font-weight: 600; cursor: pointer; padding: 4px; }
.form-error { color: var(--red); font-size: 13px; margin-top: 10px; }
.dev-note { font-size: 12px; background: #fff7e8; color: #8a5a10; border: 1px solid #f3dfb8; padding: 8px 10px; border-radius: var(--radius-sm); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; background: #18212e; color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 13px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2); max-width: calc(100vw - 32px); }
.toast.ok { border-left: 4px solid #3ccf91; }
.toast.err { border-left: 4px solid #ff6b7d; }
.toast .up { color: #6ee7b7; } .toast .down { color: #fda4af; }

/* ---------- Portfolio ---------- */
.pf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.stat b.big { font-size: 22px; font-weight: 700; display: block; margin-top: 4px; }
.guest-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.guest-banner p { font-size: 13px; margin-top: 2px; }
.pos-title { display: flex; gap: 10px; align-items: center; min-width: 0; }
.side-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.side-tag.yes, .side-tag.up { background: var(--green-soft); color: var(--green); }
.side-tag.no, .side-tag.down { background: var(--red-soft); color: var(--red); }

@media (max-width: 1040px) {
  .btc-card { grid-template-columns: 1fr; }
  .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .balance { display: none; }
}
@media (max-width: 760px) {
  .btc-card { padding: 16px; }
  .btc-stats { gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .btc-stats b { font-size: 16px; }
  .header-right .btn { height: 36px; padding: 0 12px; }
}

/* ---------- Polymarket-style cards ---------- */
.pcard { display: flex; flex-direction: column; padding: 14px 14px 10px; min-height: 196px; transition: box-shadow 0.15s, border-color 0.15s; }
.pcard:hover { box-shadow: 0 4px 16px rgba(24, 33, 46, 0.08); border-color: #dfe1e6; }
.pcard.pinned { border-color: var(--brand-line); background: linear-gradient(180deg, #fbf9ff 0%, #fff 70%); }
.pc-top { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; }
.pc-top .avatar { width: 38px; height: 38px; border-radius: 8px; }
.pc-title { flex: 1; font-size: 14px; font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-title:hover { text-decoration: underline; text-underline-offset: 2px; }
.gauge { position: relative; width: 58px; flex: none; text-align: center; margin-top: -2px; }
.gauge svg { width: 58px; height: 33px; display: block; }
.gauge b { position: absolute; left: 0; right: 0; top: 13px; font-size: 13px; font-weight: 700; }
.gauge small { display: block; font-size: 10px; color: var(--muted); margin-top: -2px; }
.pc-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; flex: 1; }
.pc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 6px; align-items: center; font-size: 13px; }
.pc-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-row .pct, .pc-prow .pct { font-weight: 700; min-width: 38px; text-align: right; }
.pc-pair { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.pc-prow { display: flex; justify-content: space-between; font-size: 13px; font-weight: 550; }
.pc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 12px; }
.pc-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.pc-foot .venues { margin-left: auto; }
.small-live { font-size: 10px; padding: 2px 7px; }
.more-out { font-size: 12px; color: var(--muted); }

.pm-btn { border: 0; border-radius: 6px; font-weight: 650; cursor: pointer; font-variant-numeric: tabular-nums; transition: background 0.12s, color 0.12s; white-space: nowrap; }
.pm-btn b { font-weight: 700; margin-left: 2px; }
.pm-btn.yes { background: var(--green-soft); color: var(--green); }
.pm-btn.no { background: var(--red-soft); color: var(--red); }
.pm-btn.yes:hover { background: var(--green); color: #fff; }
.pm-btn.no:hover { background: var(--red); color: #fff; }
.pm-btn.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.pm-btn.big { height: 38px; font-size: 13px; }
.o-btns .pm-btn { height: 40px; padding: 0 14px; font-size: 13px; min-width: 116px; }

/* ---------- Event page (chart + outcomes left, trade panel right) ---------- */
.pm-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; }
.ev-side { position: sticky; top: 132px; align-self: start; }
.big-chance { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 4px; }
.big-chance b { font-size: 30px; font-weight: 700; color: var(--brand); letter-spacing: -0.02em; }
.big-chance span { color: var(--muted); font-weight: 600; }
.chart-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.outcomes-pm { overflow: hidden; }
.o-head { display: grid; grid-template-columns: minmax(0, 1fr) 110px 260px; padding: 10px 16px; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.orow2 { display: grid; grid-template-columns: minmax(0, 1fr) 110px 260px; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); transition: background 0.12s; }
.orow2:last-child { border-bottom: 0; }
.orow2:hover, .orow2.selected { background: #fbfaff; }
.orow2.selected { box-shadow: inset 3px 0 0 var(--brand); }
.o-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.o-name i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.o-name b { font-weight: 650; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-name small { font-size: 12px; }
.o-pct { font-size: 20px; font-weight: 700; }
.o-pct .up, .o-pct .down { font-size: 12px; }
.o-btns { display: flex; gap: 8px; justify-content: flex-end; }
.tabs-inline { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs-inline button, .tabs-inline a { background: none; border: 0; padding: 10px 0; font-weight: 650; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 14px; }
.tabs-inline .active { color: var(--ink); border-color: var(--ink); }
.section-tight { margin-top: 22px; }
.round-banner { display: block; padding: 12px 16px; border-radius: var(--radius); background: #fff7e8; color: #8a5a10; border: 1px solid #f3dfb8; margin-bottom: 16px; font-size: 14px; }

/* ---------- Trade panel ---------- */
.tp { padding: 16px; }
.tp-modal { border: 0; padding: 4px 0 0; box-shadow: none; }
.tp-market { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; padding-right: 28px; }
.tp-mtitle { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tp-outcome { font-size: 15px; font-weight: 700; margin-top: 2px; }
.tp-tabs { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tp-tabs button { background: none; border: 0; padding: 0 0 10px; font-weight: 700; font-size: 15px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tp-tabs button.active { color: var(--ink); border-color: var(--ink); }
.tp-kind { margin-left: auto; font-size: 12px; color: var(--muted); padding-bottom: 10px; }
.tp-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.tp-choice { height: 48px; border: 0; border-radius: var(--radius-sm); font-weight: 700; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--surface); color: var(--muted); transition: background 0.12s, color 0.12s; overflow: hidden; }
.tp-choice span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.tp-choice.yes.active { background: var(--green); color: #fff; }
.tp-choice.no.active { background: var(--red); color: #fff; }
.tp-choice:not(.active):hover { background: #eceef1; }
.tp-amount { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: text; }
.tp-amount span { display: flex; flex-direction: column; }
.tp-amount b { font-size: 16px; font-weight: 700; }
.tp-amount small { font-size: 12px; color: var(--muted); }
.tp-amount input { border: 0; outline: none; text-align: right; font: inherit; font-size: 34px; font-weight: 700; width: 60%; min-width: 0; color: var(--ink); background: transparent; }
.tp-amount input::placeholder { color: #c5c9d0; }
.tp-quick { display: flex; gap: 6px; justify-content: flex-end; margin: 6px 0 14px; }
.tp-quick button { height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line); background: #fff; font-size: 12px; font-weight: 650; cursor: pointer; color: var(--ink); }
.tp-quick button:hover:not(:disabled) { background: var(--surface); }
.tp-quick button:disabled { opacity: 0.4; cursor: not-allowed; }
.tp-win { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); margin-bottom: 12px; }
.tp-win span { font-weight: 700; font-size: 15px; display: block; }
.tp-win small { font-size: 12px; color: var(--muted); }
.tp-win b { font-size: 26px; font-weight: 700; color: var(--green); }
.tp-go { height: 46px; font-size: 15px; }
.tp-go:disabled { background: #c9bfe0; cursor: not-allowed; }
.tp-error { color: var(--red); font-size: 13px; margin-top: 10px; }
.tp-note { font-size: 12px; color: var(--muted); margin-top: 10px; text-align: center; }

@media (max-width: 1040px) {
  .pm-layout { grid-template-columns: 1fr; }
  .ev-side { position: static; }
}
@media (max-width: 760px) {
  .o-head { display: none; }
  .orow2 { grid-template-columns: minmax(0, 1fr) auto; }
  .o-btns { grid-column: 1 / -1; }
  .o-btns .pm-btn { flex: 1; min-width: 0; }
  .tp-amount input { font-size: 28px; }
}

/* ---------- Ended / resolved state ---------- */
.tp-result h3 { font-size: 22px; font-weight: 700; margin: 6px 0 8px; letter-spacing: -0.01em; }
.tp-result p { font-size: 13px; margin-bottom: 14px; }
.tp-pending, .pending-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: #8a5a10; background: #fff7e8; padding: 4px 10px; border-radius: 999px; margin-bottom: 12px; white-space: nowrap; }
.pending-tag { margin: 0; }
.tp-pending .dot, .pending-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

.live.ended-badge { color: var(--muted); background: var(--surface); }
.live.ended-badge .dot { background: var(--muted); box-shadow: none; }

.claim-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; border-color: #cfe9dd; background: var(--green-soft); }
.claim-banner p { font-size: 13px; margin-top: 2px; }

/* ---------- prediction.com-style charts ---------- */
.mono { font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
.chart svg { display: block; overflow: visible; }
.legend span { font-size: 12px; color: var(--muted); }
.legend i { width: 8px; height: 8px; border-radius: 50%; }
.legend b { color: var(--ink); font-family: 'Geist Mono', ui-monospace, monospace; font-weight: 500; }
.tooltip { font-size: 12px; background: #18181b; border: 1px solid #27272a; }
.tooltip b { font-weight: 500; margin-left: 4px; }

/* live price flash */
@keyframes flashUp { from { box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.55); } to { box-shadow: 0 0 0 2px rgba(16, 185, 129, 0); } }
@keyframes flashDown { from { box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.5); } to { box-shadow: 0 0 0 2px rgba(239, 68, 68, 0); } }
.pcard.flash-up { animation: flashUp 1.4s ease-out; }
.pcard.flash-down { animation: flashDown 1.4s ease-out; }

/* ---------- Weather map ---------- */
.wx-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.wx-regions { border: 0; padding: 0; margin: 0; }
.wx-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.wx-mapcard { padding: 14px 14px 10px; overflow: hidden; }
.wx-maphead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.wx-maphead b { font-size: 15px; }
.wx-status { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; margin-left: 6px; background: var(--surface); color: var(--muted); }
.wx-status.resolved { background: #eef2ff; color: #4338ca; }
.wx-status.today { background: var(--green-soft); color: var(--green); }
.wx-status.upcoming { background: var(--brand-soft); color: var(--brand); }
.wx-legend { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.wx-legend i { width: 140px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #1e3a8a, #3b82f6, #93c5fd, #e5e7eb, #fcd34d, #f97316, #b91c1c); }
.wx-map { width: 100%; border-radius: var(--radius-sm); overflow: hidden; background: var(--map-ocean); }
.wx-svg { display: block; cursor: grab; }
.wx-svg:active { cursor: grabbing; }
.wx-dot circle { transition: r 0.15s; }
.wx-dot:hover circle { stroke: var(--ink); stroke-width: 2; }
.wx-dot.resolved circle { stroke-dasharray: none; }
.wx-timeline { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; }
.wx-slider-wrap { flex: 1; min-width: 0; }
.wx-slider-wrap input[type=range] { width: 100%; accent-color: var(--brand); margin: 6px 0 2px; }
.wx-ticks { display: flex; justify-content: space-between; gap: 2px; }
.wx-tick { flex: 1; background: none; border: 0; padding: 2px 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; color: var(--muted); font-size: 11px; font-weight: 600; border-radius: 6px; min-width: 0; }
.wx-tick small { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.8; }
.wx-tick.resolved small { color: #4338ca; }
.wx-tick.today small { color: var(--green); }
.wx-tick.upcoming small { color: var(--brand); }
.wx-tick.active { color: var(--ink); background: var(--surface); }
.wx-foot { margin-top: 6px; }
.wx-side { padding: 0; max-height: 640px; overflow-y: auto; position: sticky; top: 132px; }
.wx-table-head { display: grid; grid-template-columns: minmax(0, 1fr) 60px 64px; padding: 10px 14px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.wx-row { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 60px 64px; align-items: center; gap: 4px; padding: 9px 14px; background: #fff; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; font: inherit; color: inherit; }
.wx-row:hover { background: #fbfaff; }
.wx-row .temp { font-size: 16px; font-weight: 600; }
.wx-row .block { display: block; }
.wx-side > .btn-link { margin: 12px 14px 0; padding: 0; }
.wx-city-head { display: flex; align-items: baseline; gap: 8px; padding: 6px 14px 0; }
.wx-city-head h3 { font-size: 20px; font-weight: 700; }
.wx-side > .muted.small, .wx-side > p, .wx-side > .wx-big, .wx-side > .wx-bars, .wx-side > .btn, .wx-side > a.btn-link { margin-left: 14px; margin-right: 14px; }
.wx-side > .btn { width: calc(100% - 28px); margin-bottom: 4px; }
.wx-big { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; margin-bottom: 8px; }
.wx-big b { font-size: 26px; font-weight: 700; display: block; margin-top: 2px; }
.wx-big div:last-child b { font-size: 18px; display: inline; }
.wx-bars { display: flex; flex-direction: column; gap: 5px; margin: 10px 14px 14px; }
.wx-bar { display: grid; grid-template-columns: 96px minmax(0, 1fr) 40px; align-items: center; gap: 8px; font-size: 12px; }
.wx-bar .lbl { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-bar .track { height: 12px; background: var(--surface); border-radius: 4px; overflow: hidden; }
.wx-bar .track i { display: block; height: 100%; border-radius: 4px; }
.wx-bar .pct { text-align: right; }
.wx-bar.win .lbl { color: var(--ink); font-weight: 700; }
.wx-bar.win .track { box-shadow: inset 0 0 0 1.5px var(--ink); }
.wx-minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.wx-mini { padding: 10px; text-align: left; cursor: pointer; font: inherit; color: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
.wx-mini:hover { border-color: var(--brand-line); box-shadow: 0 4px 14px rgba(91, 33, 182, 0.08); }
.wx-mini.active { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.wx-mini-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 13px; }
.wx-mini-map { border-radius: 6px; overflow: hidden; pointer-events: none; }
@media (max-width: 1040px) {
  .wx-grid { grid-template-columns: 1fr; }
  .wx-side { position: static; max-height: 420px; }
}
@media (max-width: 760px) {
  .wx-tick small { display: none; }
  .wx-legend i { width: 80px; }
}

.wx-swatch { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.wx-swatch.big { width: 14px; height: 14px; vertical-align: 3px; }

/* event status */
.status-banner { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.status-banner.pending { background: #fff7e8; color: #8a5a10; border: 1px solid #f3dfb8; }
.status-banner.pending .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: pulse 1.2s infinite; align-self: center; }
.status-banner.resolved { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }
.status-banner a { font-weight: 700; text-decoration: underline; }

/* ---------- icons ---------- */
.ico { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tabs a { gap: 7px; }
.tabs a .ico { opacity: 0.8; }
.tabs a.active .ico { opacity: 1; }
.h1-ico { width: 26px; height: 26px; vertical-align: -4px; margin-right: 4px; color: var(--brand); stroke-width: 2; }

/* ---------- Globe ---------- */
.gl-controls { margin-bottom: 12px; }
.gl-chips { border: 0; padding: 0; margin: 0; }
.gl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.gl-stage { position: relative; padding: 12px; overflow: hidden; }
.gl-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.gl-legend { display: flex; gap: 4px; flex-wrap: wrap; }
.gl-leg { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; background: none; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.gl-leg i { width: 8px; height: 8px; border-radius: 50%; }
.gl-leg:hover { background: var(--surface); }
.gl-leg.active { border-color: var(--line); background: #fff; color: var(--ink); }
.gl-canvas { width: 100%; height: min(70vh, 640px); display: block; cursor: grab; touch-action: none; border-radius: var(--radius-sm); background: radial-gradient(ellipse at center, #fbfcff 0%, #f1f3fa 100%); }
.gl-card { position: absolute; left: 22px; bottom: 22px; width: min(360px, calc(100% - 44px)); padding: 16px; box-shadow: 0 18px 48px rgba(24, 33, 46, 0.18); }
.gl-card-top { display: flex; gap: 10px; align-items: flex-start; padding-right: 26px; }
.gl-card-title { font-weight: 650; font-size: 15px; line-height: 1.3; display: block; margin-top: 2px; }
.gl-card-title:hover { text-decoration: underline; }
.gl-card-prob { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 2px; }
.gl-card-prob b { font-size: 28px; font-weight: 700; color: var(--brand); }
.gl-card-prob span { color: var(--muted); font-weight: 600; font-size: 13px; }
.gl-chart { height: 120px; margin-top: 4px; }
.gl-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 6px; }
.gl-side { padding: 0; max-height: calc(70vh + 60px); display: flex; flex-direction: column; position: sticky; top: 132px; }
.gl-side-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; gap: 8px; }
.gl-search { margin: 0 14px; width: calc(100% - 28px); height: 38px; font-size: 14px; }
.gl-count { padding: 8px 14px; border-bottom: 1px solid var(--line); }
.gl-list { overflow-y: auto; flex: 1; }
.gl-item { width: 100%; display: grid; grid-template-columns: 22px 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.gl-item:hover, .gl-item.active { background: #fbfaff; }
.gl-item.active { box-shadow: inset 3px 0 0 var(--brand); }
.gl-rank { color: var(--muted); font-size: 12px; text-align: right; }
.gl-dot { width: 9px; height: 9px; border-radius: 50%; }
.gl-main { min-width: 0; display: flex; flex-direction: column; }
.gl-title { font-weight: 600; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gl-main small { font-size: 11px; margin-top: 2px; }
.gl-prob { text-align: right; display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; }
.gl-prob b { font-size: 14px; }
@media (max-width: 1040px) {
  .gl-grid { grid-template-columns: 1fr; }
  .gl-side { position: static; max-height: 520px; }
  .gl-canvas { height: 56vh; }
}
@media (max-width: 760px) {
  .gl-card { position: static; width: auto; margin-top: 10px; box-shadow: none; }
  .gl-canvas { height: 46vh; }
  .tabs a .ico { display: none; }
}

/* ---------- Globe hub sub-navigation ---------- */
.gl-subnav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -6px 0 18px; padding-bottom: 2px; }
.gl-subnav a { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.gl-subnav a:hover { color: var(--ink); border-color: #d4d7dd; }
.gl-subnav a.active { color: #fff; background: var(--brand); border-color: var(--brand); }
.gl-subnav a.active .ico { color: #fff; }
.gl-subnav a[href="/globe/war"].active { background: #b91c1c; border-color: #b91c1c; }
.gl-title .gl-dot { display: inline-block; margin-right: 6px; vertical-align: 1px; }
.gl-item { grid-template-columns: 22px minmax(0, 1fr) auto; }
.gl-swatch { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.gl-wxhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 2px 6px; font-size: 14px; }
.gl-wxdates { display: flex; gap: 2px; background: var(--surface); border-radius: var(--radius-sm); padding: 3px; overflow-x: auto; }
.gl-wxdates button { border: 0; background: transparent; height: 28px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.gl-wxdates button.resolved { color: #6366f1; }
.gl-wxdates button.today { color: var(--green); }
.gl-wxdates button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.gl-citychips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 8px; padding: 2px; }
.gl-citychip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--ink); }
.gl-citychip i { width: 10px; height: 10px; border-radius: 50%; }
.gl-citychip.active { border-color: var(--ink); }
.gl-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)); gap: 6px; margin-top: 12px; }
.gl-day { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.gl-day small { font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.gl-day b { font-size: 14px; }
.gl-day i { font-style: normal; font-size: 9px; color: var(--muted); }
.gl-day.active { border-color: var(--brand); background: var(--brand-soft); }
.gl-front { margin-top: 10px; padding: 10px 4px 0; border-top: 1px solid var(--line); }
.gl-front-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.gl-front input[type=range] { width: 100%; accent-color: #b91c1c; margin: 8px 0 2px; }
.gl-front-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.gl-front p { margin-top: 6px; }
.gl-front a { color: var(--brand); font-weight: 600; }
.gl-conflicts { border-top: 1px solid var(--line); padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.gl-conflicts .label { margin-bottom: 4px; }
.gl-conflict { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 5px 0; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; text-align: left; }
.gl-conflict:hover { color: #b91c1c; }
.gl-conflict i { width: 10px; height: 10px; border-radius: 3px; background: rgba(220, 38, 38, 0.55); box-shadow: inset 0 0 0 1px #b91c1c; }

/* ---------- trade panel v2 (reference layout, Oddtopus colours) ---------- */
.tp { padding: 18px 18px 14px; border-radius: 16px; }
.tp-market { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; padding-right: 28px; }
.avatar-md { width: 44px; height: 44px; border-radius: 10px; }
.tp-mtitle { font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.tp-outcome { font-size: 17px; font-weight: 700; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-yes { color: var(--green); }
.tp-no { color: var(--red); }
.tp-tabs { align-items: flex-end; }
.tp-tabs button { font-size: 16px; padding-bottom: 11px; }
.tp-order { margin-left: auto; position: relative; display: inline-flex; align-items: center; gap: 2px; padding-bottom: 10px; color: var(--ink); font-weight: 600; font-size: 14px; }
.tp-order select { appearance: none; border: 0; background: transparent; font: inherit; color: inherit; padding-right: 18px; cursor: pointer; outline: none; }
.tp-order svg { width: 16px; height: 16px; position: absolute; right: 0; top: 2px; fill: none; stroke: var(--muted); stroke-width: 2; pointer-events: none; }
.tp-choice { height: 50px; font-size: 16px; font-weight: 600; background: #fff; border: 1.5px solid var(--line); color: var(--muted); }
.tp-choice b { font-weight: 700; }
.tp-choice:not(.active):hover { background: var(--surface); }
.tp-choice.yes.active { border-color: var(--green); background: var(--green); color: #fff; }
.tp-choice.no.active { border-color: var(--red); background: var(--red); color: #fff; }
.tp-amount b { font-size: 17px; }
.tp-amount input { font-size: 44px; letter-spacing: -0.02em; }
.tp-quick { gap: 8px; margin: 8px 0 16px; }
.tp-quick button { height: 32px; padding: 0 12px; border-radius: 8px; border: 0; background: var(--surface); font-size: 13px; font-weight: 650; }
.tp-quick button:hover:not(:disabled) { background: #e9ebef; }
.tp-sep { border-top: 1px solid var(--line); margin: 4px 0 16px; }
.tp-win { padding: 16px 0 14px; margin-bottom: 14px; }
.tp-win span { display: inline-flex; align-items: center; gap: 6px; font-size: 17px; }
.tp-bill { width: 22px; height: 15px; transform: rotate(-12deg); }
.tp-win small { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 13px; }
.tp-info { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; border: 1.3px solid var(--muted); font-size: 10px; font-style: normal; font-weight: 700; cursor: help; }
.tp-win b { font-size: 40px; letter-spacing: -0.02em; }
.tp-go { width: 100%; height: 50px; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font: inherit; font-size: 16px; font-weight: 650; cursor: pointer; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18); transition: transform 0.06s, box-shadow 0.06s, background 0.15s; }
.tp-go:hover:not(:disabled) { background: var(--brand-hover); }
.tp-go:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18); }
.tp-go:disabled { background: #c9bfe0; box-shadow: none; cursor: not-allowed; }
.tp-note { margin-top: 12px; }

.chip .ico { width: 14px; height: 14px; }

/* war view: dark, realistic stage */
.gl-stage.war { background: #0a0f1c; border-color: #1f2937; }
.gl-stage.war .gl-canvas { background: radial-gradient(ellipse at center, #13213d 0%, #050913 75%); }
.gl-stage.war .seg { background: #111827; }
.gl-stage.war .seg button { color: #9ca3af; }
.gl-stage.war .seg button.active { background: #1f2937; color: #fff; }
.gl-stage.war .gl-front { border-top-color: #1f2937; color: #e5e7eb; }
.gl-stage.war .gl-front .muted { color: #9ca3af; }
.gl-stage.war .gl-front a { color: #fca5a5; }
.gl-stage.war .gl-card { background: #fff; }

/* zoom controls on the map */
.gl-canvas-wrap { position: relative; }
.gl-zoom { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.gl-zoom button { min-width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.95); font: inherit; font-size: 20px; font-weight: 600; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 4px 12px rgba(24,33,46,.12); }
.gl-zoom button:hover { background: #fff; border-color: #cfd3da; }
.gl-zoom button[data-zoom="world"] { font-size: 12px; padding: 0 10px; }
.gl-zoom button[data-zoom="world"] .ico { width: 15px; height: 15px; }
.gl-stage.war .gl-zoom button { background: rgba(17,24,39,.85); color: #f3f4f6; border-color: #374151; }

.gl-conflict small { margin-left: auto; font-size: 11px; }
.gl-conflict.hot i { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.9); }
.gl-conflict i.ref { background: rgba(239, 68, 68, 0.18); box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.8); }

/* day steppers (weather & front) */
.gl-stepper { display: inline-flex; gap: 4px; }
.gl-stepper button { width: 32px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; color: var(--ink); }
.gl-stepper button:hover { background: var(--surface); }
.gl-stepper #gl-wxplay, .gl-stepper #gl-frontplay { background: var(--brand); color: #fff; border-color: var(--brand); font-size: 12px; }
.gl-timeline { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.gl-timeline input[type=range] { flex: 1; margin: 0; }
.gl-stage.war .gl-stepper button { background: #111827; color: #f3f4f6; border-color: #374151; }
.gl-stage.war .gl-stepper #gl-frontplay { background: #b91c1c; border-color: #b91c1c; }

.magic-card { max-width: 420px; margin: 40px auto; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.magic-card h1 { font-size: 22px; font-weight: 700; }
/* globe sub-navigation must not stick to the ticker */
.gl-subnav { margin: 4px 0 20px; }

/* Top wars (history-atlas look) */
.gl-wars { padding: 4px 14px 10px; border-bottom: 1px solid var(--line); }
.gl-wars .label { margin-bottom: 6px; }
.gl-war { width: 100%; display: grid; grid-template-columns: 18px auto minmax(0, 1fr); gap: 8px; align-items: center; padding: 7px 8px; margin-bottom: 4px; border: 1px solid #e7dcc0; border-radius: 8px; background: #fbf6e8; cursor: pointer; text-align: left; font: inherit; color: #3b2a12; }
.gl-war:hover { border-color: #c9b07a; }
.gl-war.active { border-color: #7c5a2b; box-shadow: inset 0 0 0 1px #7c5a2b; background: #f5e9c8; }
.gl-war-rank { font-size: 11px; color: #9a7b4a; text-align: right; }
.gl-war-flags { font-size: 15px; white-space: nowrap; }
.gl-war-main { display: flex; flex-direction: column; min-width: 0; }
.gl-war-main b { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-war-main small { font-size: 11px; }
.gl-war-clear { margin-top: 2px; }

.orow2.resolved { opacity: 0.55; }
.orow2.resolved .o-pct { font-size: 15px; }

.gl-strikes { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.08); }
.gl-strikes-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.gl-strikes-head .seg button { padding: 2px 8px; font-size: 12px; }
.gl-strikes-legend { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 4px; }
.gl-strikes-legend .sk { display: inline-block; width: 8px; height: 8px; transform: rotate(45deg); margin-right: 6px; vertical-align: 1px; border: 1px solid rgba(0,0,0,0.5); }
.sk-axis { background: rgb(251, 146, 60); }
.sk-cf { background: rgb(96, 165, 250); }

.surge { color: #ea580c; font-weight: 600; white-space: nowrap; }

.gl-warchip { display: inline-flex; align-items: center; gap: 6px; }
.gl-warchip .gl-war-flags { font-size: 13px; letter-spacing: -2px; }
.gl-warchip small { opacity: 0.6; font-variant-numeric: tabular-nums; }

/* full-width map; lists below it */
.gl-grid { grid-template-columns: minmax(0, 1fr); }
.gl-canvas { height: min(78vh, 860px); }
.gl-side { position: static; max-height: none; }
.gl-side .gl-list { max-height: 560px; }
.gl-side-body { display: flex; flex-direction: column; }
.gl-side-main { display: flex; flex-direction: column; min-width: 0; }
.gl-side-main .gl-search { margin-top: 12px; }
.gl-side-aside:empty { display: none; }
.gl-side.war .gl-side-head { border-bottom: 1px solid var(--line); }
.gl-side.war .gl-side-body { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); align-items: start; }
.gl-side.war .gl-side-aside { border-right: 1px solid var(--line); }
.gl-side.war .gl-list { max-height: 820px; }
@media (max-width: 860px) {
  .gl-side.war .gl-side-body { display: flex; flex-direction: column; }
  .gl-side.war .gl-side-aside { border-right: 0; }
  .gl-canvas { height: 60vh; }
}
.gl-countrychips { margin-top: 8px; }
.gl-chips-label { font-size: 12px; font-weight: 600; color: var(--muted); align-self: center; margin-right: 4px; }
.gl-warchip[data-inactive="true"] { opacity: 0.45; }

.gl-attrib { font-size: 10.5px; color: #6b7280; text-align: right; margin: 4px 2px 0; }
.gl-attrib a { color: inherit; text-decoration: underline; }

.gl-sizelegend { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); margin: 8px 2px 0; line-height: 1.4; }
.gl-stage.war .gl-sizelegend { color: #9ca3af; }
.gl-sizelegend b { color: inherit; font-weight: 650; }
.gl-sz { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.gl-sz i { display: inline-block; border-radius: 50%; background: #ef4444; border: 1px solid #fff; }
.gl-sz .s1 { width: 6px; height: 6px; opacity: 0.5; }
.gl-sz .s2 { width: 11px; height: 11px; opacity: 0.8; }
.gl-sz .s3 { width: 18px; height: 18px; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.3), 0 0 10px rgba(255, 80, 60, 0.9); }

.gl-tl .gl-timeline { flex-wrap: wrap; }
.gl-tl-modes { flex: none; }
.gl-tl-modes button { padding: 4px 9px; font-size: 12px; }
.gl-stage.war .gl-strikes, .gl-stage.war .gl-strikes b { color: #e5e7eb; }
.gl-stage.war .gl-strikes-legend span { color: #d1d5db; }

.gl-stage.war > .gl-tl, .gl-stage.war > .gl-front { margin: 0 0 10px; padding: 10px 12px; border: 1px solid #1f2937; border-radius: 10px; background: #0f172a; border-top-color: #1f2937; }
.gl-zones { margin-top: 10px; }
.gl-zones .label { color: #9ca3af; }
.gl-zone-list { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; }
.gl-zone { font-size: 12px; color: #d1d5db; display: inline-flex; align-items: center; gap: 6px; }
.gl-zone i { width: 12px; height: 10px; border-radius: 2px; opacity: 0.85; }
.gl-zone i.pt { width: 7px; height: 7px; border-radius: 1px; }
.gl-zone small { font-size: 11px; }

.gl-sizemode button { white-space: nowrap; }

/* ---- one-screen war map ---- */
.gl-stage.war .gl-canvas { height: calc(100vh - 405px); min-height: 420px; max-height: 960px; }
#gl-chips:has(.gl-countrysel) { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; align-items: center; }
#gl-chips:has(.gl-countrysel) .chip { flex: none; }
.gl-countrysel { flex: none; height: 32px; border-radius: 999px; border: 1px solid var(--line); background: #fff; padding: 0 10px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.gl-countrysel.active { border-color: var(--brand); color: var(--brand); }
.gl-canvas-wrap { position: relative; }
.gl-overlay { position: absolute !important; left: 10px; right: 10px; bottom: 10px; margin: 0 !important; padding: 8px 12px !important; background: rgba(10, 15, 28, 0.82) !important; backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, 0.1) !important; border-radius: 10px; z-index: 2; }
.gl-overlay p, .gl-overlay .gl-front-ticks { display: none; }
.gl-overlay .gl-front-head { margin-bottom: 4px; font-size: 13px; }
.gl-overlay .gl-front-head .small { font-size: 11px; }
.gl-overlay .gl-timeline { gap: 8px; align-items: center; flex-wrap: nowrap; }
.gl-overlay .gl-stepper button { width: 30px; height: 28px; }
.gl-overlay .gl-tl-modes button { padding: 3px 7px; font-size: 11.5px; }
.gl-intro { font-size: 12.5px; color: #9ca3af; margin: 10px 2px 0; line-height: 1.45; }
@media (max-width: 760px) {
  .gl-stage.war .gl-canvas { height: 62vh; min-height: 360px; }
  .gl-overlay .gl-tl-modes { display: none; }
}

.gl-sizewrap { display: inline-flex; align-items: center; gap: 6px; }
.gl-sizemode button:disabled { opacity: 0.4; cursor: not-allowed; }
.gl-hint { position: relative; width: 20px; height: 20px; border-radius: 50%; border: 1px solid #4b5563; background: transparent; color: #9ca3af; font: 600 11px/18px Georgia, serif; font-style: italic; cursor: help; padding: 0; }
.gl-stage:not(.war) .gl-hint { border-color: var(--line); color: var(--muted); }
.gl-hint-pop { display: none; position: absolute; right: 0; top: 26px; width: 300px; z-index: 20; padding: 10px 12px; border-radius: 10px; background: #111827; color: #e5e7eb; font: 400 12.5px/1.45 Inter, system-ui, sans-serif; font-style: normal; text-align: left; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); }
.gl-hint:hover .gl-hint-pop, .gl-hint:focus .gl-hint-pop { display: block; }

/* ---- map: full screen + phones ---- */
.gl-canvas-wrap .gl-card { z-index: 5; }
.gl-fullbtn { font-size: 16px; }
body.gl-noscroll { overflow: hidden; }
.gl-stage.gl-full { position: fixed !important; inset: 0; z-index: 1000; margin: 0; border-radius: 0; padding: 8px; overflow: hidden; display: flex; flex-direction: column; }
.gl-stage.gl-full > :not(.gl-toolbar):not(.gl-canvas-wrap) { display: none !important; }
.gl-stage.gl-full .gl-canvas-wrap { flex: 1; min-height: 0; }
.gl-stage.gl-full .gl-canvas { height: 100% !important; max-height: none !important; min-height: 0 !important; }
.gl-stage:fullscreen { width: 100vw; height: 100vh; }
@media (max-width: 760px) {
  /* the market card sits on the map as a bottom sheet, so it is visible without scrolling */
  .gl-canvas-wrap .gl-card { position: absolute !important; left: 6px !important; right: 6px !important; top: auto !important; bottom: 6px !important; width: auto !important; max-height: 62%; overflow-y: auto; margin: 0; padding: 12px 14px; box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35); border-radius: 14px; }
  .gl-canvas-wrap .gl-card .gl-chart { height: 90px; }
  .gl-zoom button { width: 40px; height: 40px; }
  .gl-zoom button[data-zoom="world"] span { display: none; }
  .gl-stage.gl-full .gl-toolbar { gap: 6px; }
}

/* anchored popover with a pointer tail */
.gl-canvas-wrap .gl-card { transition: opacity 0.15s; }
.gl-card[data-side]::after { content: ''; position: absolute; width: 14px; height: 14px; background: inherit; transform: rotate(45deg); box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.08); }
.gl-card[data-side="top"]::after { bottom: -7px; left: calc(var(--tail, 50%) - 7px); }
.gl-card[data-side="bottom"]::after { top: -7px; left: calc(var(--tail, 50%) - 7px); box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.06); }
.gl-card[data-side="right"]::after { left: -7px; top: calc(var(--tail, 50%) - 7px); box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.06); }
.gl-card[data-side="left"]::after { right: -7px; top: calc(var(--tail, 50%) - 7px); }
.gl-card-meta { font-size: 12px; color: var(--muted); margin: 2px 0 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gl-hot-tag { font-size: 11px; font-weight: 700; color: #c2410c; background: #fff1e6; border-radius: 999px; padding: 1px 7px; }
@media (max-width: 760px) { .gl-card::after { display: none !important; } }

.gl-hot-tag.accel { color: #a16207; background: #fef9c3; }

/* trade panel: label column stacks (To win / Avg. price / fee) */
.tp-win .tp-win-l { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.tp-win .tp-win-l span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tp-win .tp-win-l small { display: inline-flex; align-items: center; gap: 5px; margin: 0; white-space: nowrap; }
.tp-win .tp-fee { font-size: 11.5px; opacity: 0.85; }
.tp-win b { flex: none; margin-left: 12px; }
