
:root {
  --bg: #090b0e;
  --bg-elev: #11141a;
  --panel: #141820;
  --panel2: #1b202b;
  --panel3: #232a38;
  --line: #252c3a;
  --line-bright: #343e52;
  --ink: #f1f4f9;
  --ink-soft: #c7d0df;
  --mute: #8b95a7;
  --faint: #5e6778;
  --up: #2ee59d;
  --up-bg: rgba(46, 229, 157, 0.12);
  --down: #ff6b7a;
  --down-bg: rgba(255, 107, 122, 0.12);
  --amber: #f7b955;
  --amber-bg: rgba(247, 185, 85, 0.13);
  --accent: #6ea8fe;
  --accent-bg: rgba(110, 168, 254, 0.14);
  --purple: #c084fc;
  --r: 16px;
  --r-sm: 11px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  background: #050709;
  color: var(--ink);
  font: 14.5px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Desktop outer presenter bar + Mobile frame container */
.workspace-bar {
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(9, 11, 14, 0.85);
  backdrop-filter: blur(12px);
}
.wb-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wb-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 99px;
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid rgba(110, 168, 254, 0.3);
}
.wb-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wb-btn {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 99px;
  background: var(--panel);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}
.wb-btn:hover { border-color: var(--accent); color: var(--ink); }
.wb-btn.active { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }

.app-shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: 92px;
  transition: max-width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 1px solid rgba(255,255,255,0.06);
  border-right: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 20px 60px rgba(0,0,0,0.65);
}
.app-shell.wide-mode {
  max-width: 960px;
}

@media (max-width: 540px) {
  .workspace-bar { padding: 8px 12px; }
  .wb-hide-sm { display: none; }
  .app-shell { border-left: 0; border-right: 0; box-shadow: none; }
}

a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Sticky Mobile Header */
.top-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 16px 11px;
  background: rgba(9, 11, 14, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(37, 44, 58, 0.65);
}
.brand-wrap { display: flex; align-items: center; gap: 8px; }
.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6ea8fe 0%, #3ecf8e 100%);
  color: #06090e;
  font-weight: 900;
  font-size: 15px;
  display: grid;
  place-items: center;
  letter-spacing: -0.03em;
}
.brand { font-weight: 800; letter-spacing: 0.07em; font-size: 17px; }
.brand .dot { color: var(--accent); }
.brand-tag { font-size: 10.5px; color: var(--mute); display: block; line-height: 1; margin-top: 1px; }

.status-pills { display: flex; align-items: center; gap: 6px; }
.pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--mute);
  background: var(--panel);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pill.live { color: var(--up); border-color: rgba(46, 229, 157, 0.35); background: var(--up-bg); }
.pill.demo { color: var(--amber); border-color: rgba(247, 185, 85, 0.35); background: var(--amber-bg); }
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--panel);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-size: 14px;
  transition: all 0.15s ease;
}
.icon-btn:hover, .icon-btn.playing { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

/* Views */
.view { display: none; padding: 12px 14px 20px; animation: fadeIn 0.18s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

/* Hero banner */
.hero {
  background: linear-gradient(160deg, rgba(27, 32, 43, 0.85) 0%, rgba(20, 24, 32, 0.4) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 15px;
  margin-bottom: 12px;
}
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hero-k { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.hero-k b { color: var(--accent); }
.hero-sub { color: var(--mute); font-size: 12.5px; margin-top: 4px; }

/* Progress & Triage Bar */
.triage-bar {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.triage-prog-wrap { flex: 1; min-width: 140px; }
.triage-prog-lbl { font-size: 11px; color: var(--mute); display: flex; justify-content: space-between; margin-bottom: 4px; }
.triage-track { height: 5px; background: var(--panel2); border-radius: 99px; overflow: hidden; }
.triage-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--up)); border-radius: 99px; transition: width 0.25s ease; }
.triage-actions { display: flex; gap: 6px; }
.mini-btn {
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  transition: all 0.15s;
}
.mini-btn:hover, .mini-btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

/* Horizontal Chip Scrollers */
.chips-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 1px 10px;
  scrollbar-width: none;
}
.chips-row::-webkit-scrollbar { display: none; }
.chips-row.wrap { flex-wrap: wrap; overflow-x: visible; }
.chip {
  padding: 6px 12px;
  border-radius: 99px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--mute);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--line-bright); color: var(--ink); }
.chip.on {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  font-weight: 700;
}
.chip.cat-chip.on {
  background: var(--accent-bg);
  color: var(--accent);
  border-color: var(--accent);
}

/* Section Headers */
.group-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 4px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}
.group-h .n {
  font-family: var(--mono);
  background: var(--panel2);
  padding: 2px 7px;
  border-radius: 99px;
  color: var(--ink-soft);
  font-size: 10.5px;
}

/* Cards */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 10px;
  transition: border-color 0.15s ease, transform 0.12s ease, opacity 0.2s ease;
}
.card:hover { border-color: var(--line-bright); }
.card.act { border-left: 3.5px solid var(--accent); }
.card.watch { border-left: 3.5px solid var(--amber); }
.card.seen { opacity: 0.58; }
.card.bookmarked { border-color: rgba(247, 185, 85, 0.55); }

.row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.sp { flex: 1; }
.sym {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--ink);
  cursor: pointer;
}
.sym:hover { color: var(--accent); text-decoration: underline; }
.co { color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.sec-badge {
  font-size: 10px;
  padding: 1.5px 6px;
  border-radius: 5px;
  background: rgba(255,255,255,0.04);
  color: var(--faint);
  border: 1px solid rgba(255,255,255,0.05);
}

.tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2.5px 7px;
  border-radius: 6px;
  background: var(--panel2);
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.tag.t-results { color: #7cc4ff; background: rgba(124, 196, 255, 0.12); }
.tag.t-M\&A { color: #d8b4fe; background: rgba(216, 180, 254, 0.12); }
.tag.t-management_change { color: #fcd34d; background: rgba(252, 211, 77, 0.12); }
.tag.t-litigation { color: var(--down); background: var(--down-bg); }
.tag.t-fund_raise { color: var(--up); background: var(--up-bg); }
.tag.t-pledging { color: #fb923c; background: rgba(251, 146, 60, 0.12); }
.tag.t-capex { color: #38bdf8; background: rgba(56, 189, 248, 0.12); }
.tag.t-credit_rating { color: #a3e635; background: rgba(163, 230, 53, 0.12); }

.chg { font-family: var(--mono); font-size: 12px; font-weight: 600; }
.up { color: var(--up); }
.down { color: var(--down); }
.amber { color: var(--amber); }

.subj { margin-top: 8px; font-weight: 600; font-size: 14.5px; line-height: 1.35; color: var(--ink); }
.summ { margin-top: 5px; color: var(--ink-soft); font-size: 13px; line-height: 1.45; }

/* Results Mini-Table inside Push Card */
.rt-wrap {
  margin-top: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  overflow-x: auto;
}
.rt { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rt th {
  font-weight: 600;
  color: var(--faint);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: right;
  padding: 4px 6px 6px;
}
.rt th:first-child, .rt td:first-child { text-align: left; padding-left: 0; }
.rt th:last-child, .rt td:last-child { padding-right: 0; }
.rt td {
  padding: 6px 6px;
  border-top: 1px solid rgba(37, 44, 58, 0.7);
  text-align: right;
  font-family: var(--mono);
}
.rt td:first-child { font-family: var(--font); color: var(--ink-soft); font-weight: 500; }
.margin-note {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--mute);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* Executive Person Card inside Push Card */
.person {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  padding: 11px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.av {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  background: linear-gradient(135deg, #2b3a55, #4a3525);
  color: #fff;
  flex: none;
  border: 1px solid rgba(255,255,255,0.1);
}
.person .nm { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.person .rl { font-size: 12px; color: var(--mute); margin-top: 1px; }
.person .bio { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; line-height: 1.45; }
.dir-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 5px;
  text-transform: uppercase;
}
.dir-in { background: var(--up-bg); color: var(--up); }
.dir-out { background: var(--down-bg); color: var(--down); }

/* Card Footer & Action Strip */
.meta {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(37, 44, 58, 0.55);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--faint);
}
.why-pill {
  color: var(--amber);
  font-weight: 500;
  font-size: 11px;
  background: var(--amber-bg);
  padding: 2px 7px;
  border-radius: 6px;
}
.card-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.act-link {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--panel2);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  cursor: pointer;
}
.act-link:hover { border-color: var(--accent); color: var(--accent); }
.act-link.pri { background: var(--accent-bg); color: var(--accent); border-color: rgba(110,168,254,0.3); }

/* Routine Accordion */
.routine summary {
  list-style: none;
  cursor: pointer;
  color: var(--mute);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.routine summary::-webkit-details-marker { display: none; }
.rline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--mute);
}
.rline:first-of-type { margin-top: 10px; }

/* RADAR: Threshold Control Panel & Watchlist */
.thresh-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 13px 14px;
  margin-bottom: 12px;
}
.thresh-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
@media (max-width: 400px) { .thresh-grid { grid-template-columns: 1fr; } }
.slider-box {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 11px;
}
.slider-hdr { display: flex; justify-content: space-between; font-size: 12px; color: var(--mute); }
.slider-hdr b { color: var(--accent); font-family: var(--mono); }
input[type=range] { width: 100%; margin-top: 7px; accent-color: var(--accent); cursor: pointer; }

.cause-box {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-soft);
}
.cause-box.unexplained {
  border-color: rgba(247, 185, 85, 0.35);
  background: rgba(247, 185, 85, 0.06);
}

.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.app-shell.wide-mode .watchlist-grid {
  grid-template-columns: repeat(3, 1fr);
}
.tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.tile.hot {
  border-color: rgba(247, 185, 85, 0.65);
  background: linear-gradient(180deg, rgba(247, 185, 85, 0.07) 0%, var(--panel) 100%);
}
.tile svg { width: 100%; height: 32px; margin-top: 6px; display: block; }
.tile .vm { font-size: 11px; color: var(--faint); margin-top: 4px; }

/* RESEARCH */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.search-bar input {
  flex: 1;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-bright);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-transform: uppercase;
}
.search-bar input:focus { outline: none; border-color: var(--accent); }
.search-bar input::placeholder { text-transform: none; font-weight: 400; color: var(--faint); }
.search-bar button {
  padding: 0 18px;
  border-radius: 12px;
  background: var(--accent);
  color: #06090f;
  font-weight: 700;
}

.rh-card {
  background: linear-gradient(155deg, #171d29 0%, #11151d 100%);
  border: 1px solid var(--line-bright);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 10px;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 12px;
}
.app-shell.wide-mode .kpis {
  grid-template-columns: repeat(6, 1fr);
}
.kpi {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 9px;
}
.kpi .k { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.kpi .v { font-family: var(--mono); font-size: 13.5px; font-weight: 700; margin-top: 3px; color: var(--ink); }

.card h4 {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card h4 span { color: var(--accent); font-family: var(--mono); text-transform: none; letter-spacing: 0; font-weight: 600; }

/* Credibility banner */
.cred-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  margin-bottom: 10px;
}
.cred-score { font-size: 17px; font-weight: 800; }
.cred-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 99px;
  text-transform: uppercase;
}
.verdict {
  font-size: 10px;
  padding: 2.5px 7px;
  border-radius: 5px;
  font-family: var(--font);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.v-beat { background: var(--up-bg); color: var(--up); border: 1px solid rgba(46,229,157,0.3); }
.v-met { background: var(--accent-bg); color: var(--accent); border: 1px solid rgba(110,168,254,0.3); }
.v-missed { background: var(--down-bg); color: var(--down); border: 1px solid rgba(255,107,122,0.3); }
.quote { font-size: 11.5px; color: var(--mute); font-style: italic; margin-top: 3px; line-height: 1.35; }

/* Segment Mix Bar */
.seg-stack {
  display: flex;
  height: 10px;
  border-radius: 99px;
  overflow: hidden;
  gap: 2px;
  margin: 10px 0;
}
.seg-list { display: grid; gap: 6px; margin-top: 8px; }
.seg-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  padding: 5px 8px;
  background: var(--bg-elev);
  border-radius: 8px;
}
.seg-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }

/* Bull vs Bear */
.bb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 420px) { .bb-grid { grid-template-columns: 1fr; } }
.bb-col {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 11px;
}
.bb-col.bull-col { border-top: 2.5px solid var(--up); }
.bb-col.bear-col { border-top: 2.5px solid var(--down); }
.bb-col .h { font-weight: 700; font-size: 12.5px; margin-bottom: 6px; display: flex; align-items: center; gap: 5px; }
.bb-col ul { list-style: none; font-size: 12.5px; color: var(--ink-soft); }
.bb-col li { padding: 6px 0; border-top: 1px solid rgba(37,44,58,0.6); line-height: 1.4; }
.bb-col li:first-child { border-top: 0; padding-top: 2px; }

.chart-svg { width: 100%; height: 135px; display: block; }
.legend { display: flex; gap: 14px; font-size: 11px; color: var(--mute); margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }

/* Ask Copilot Box */
.ask-form { display: flex; gap: 8px; margin-top: 8px; }
.ask-form input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-bright);
  background: var(--bg-elev);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}
.ask-form button {
  padding: 0 15px;
  border-radius: 10px;
  background: var(--accent);
  color: #06090f;
  font-weight: 700;
  font-size: 13px;
}
.answer-box {
  margin-top: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
  white-space: pre-wrap;
  line-height: 1.5;
  display: none;
}
.answer-box.show { display: block; }
.note { font-size: 11.5px; color: var(--faint); margin-top: 7px; line-height: 1.4; }

/* Bottom Navigation Tabs */
.bottom-tabs {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 40;
  display: flex;
  justify-content: space-around;
  background: rgba(11, 14, 19, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line-bright);
  padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
  transition: max-width 0.25s ease;
}
.app-shell.wide-mode ~ .bottom-tabs,
body.wide-active .bottom-tabs {
  max-width: 960px;
}
.bottom-tabs button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
  position: relative;
  padding: 4px 0;
  border-radius: 10px;
  transition: color 0.15s ease;
}
.bottom-tabs .ic { font-size: 17px; line-height: 1.1; }
.bottom-tabs button.on { color: var(--accent); }
.badge {
  position: absolute;
  top: 0px;
  left: 55%;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  background: var(--down);
  color: #fff;
  border-radius: 99px;
  padding: 0 5px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  display: none;
}
.badge.show { display: block; }

/* Modals & Drawers */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(3, 5, 8, 0.78);
  backdrop-filter: blur(6px);
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-backdrop.open { display: flex; }
.modal-sheet {
  width: 100%;
  max-width: 520px;
  max-height: 86vh;
  background: var(--panel);
  border: 1px solid var(--line-bright);
  border-radius: 20px 20px 0 0;
  padding: 16px 18px 26px;
  overflow-y: auto;
  animation: slideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.modal-title { font-weight: 800; font-size: 16px; }
.close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--panel2);
  color: var(--mute);
  display: grid;
  place-items: center;
  font-weight: 700;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 82px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--bg);
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 99px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 80;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
