/* AnyChain — launchpad dashboard.
   One dark palette. Mint means money (P&L, rewards, live), indigo means "act"
   (the primary button and the selected range); chain colours only ever mark a chain. */

/* ---------- themes ----------
   Every colour is a token. A theme only swaps tokens; nothing below reads a raw
   colour. `--primary` can be overridden from Customize on any theme.
   `--accent` is P&L text, `--accent-fill` is P&L marks (bars, lines): in light
   themes the text step is darker so small figures still clear 4.5:1. */

:root,
[data-theme="default"] {
  color-scheme: dark;
  /* monochrome: black and white; colour is kept for P&L and chain logos */
  --bg: #000000;      --side: #050505;    --card: #0c0c0d;   --card-hi: #121214;
  --surface: #19191c; --line: #1c1c1f;    --line-hi: #2c2c31;
  --ink: #f5f5f7;     --prose: #c4c4ca;   --muted: #8b8b93;  --dim: #5b5b63;
  --accent: #34e3a8;  --accent-fill: #34e3a8; --neg: #f2646f;
  --theme-primary: #ffffff;
  --on-primary: #000000;
  /* chain identity — validated 4-slot set for dark surfaces */
  --c-rh: #3987e5; --c-base: #d95926; --c-sol: #199e70; --c-bnb: #c98500;
  --shadow: rgba(0, 0, 0, .7);
}
[data-theme]:not([data-theme="default"]) { --on-primary: #ffffff; }
[data-theme="dark"] {
  --bg: #09090b; --side: #0c0c0e; --card: #111113; --card-hi: #161618;
  --surface: #1c1c1f; --line: #222225; --line-hi: #2e2e33;
  --ink: #f2f2f3; --prose: #c7c7cc; --muted: #8b8b93; --dim: #5e5e66;
  --theme-primary: #4f6ef7;
}
[data-theme="legacy"] {
  --bg: #101218; --side: #12141b; --card: #161922; --card-hi: #1b1f2a;
  --surface: #212633; --line: #252a36; --line-hi: #313748;
  --ink: #e9ecf5; --prose: #c0c6d6; --muted: #8790a6; --dim: #5c6378;
  --theme-primary: #98abff;
}
[data-theme="emerald"] {
  --bg: #0a0d0c; --side: #0c100e; --card: #111614; --card-hi: #161c19;
  --surface: #1b231f; --line: #1f2824; --line-hi: #2b3731;
  --ink: #ebf2ee; --prose: #c1cec7; --muted: #86958d; --dim: #5a6861;
  --theme-primary: #3ccf7a;
}
[data-theme="midnight"] {
  --bg: #07070d; --side: #09091a; --card: #0e0e1a; --card-hi: #131325;
  --surface: #19192e; --line: #1c1c33; --line-hi: #282847;
  --ink: #ecebf7; --prose: #c3c1dc; --muted: #8987a8; --dim: #5d5b7c;
  --theme-primary: #8b5cf6;
}
[data-theme="light"],
[data-theme="light-blue"],
[data-theme="light-rose"] {
  color-scheme: light;
  --bg: #f6f7f9; --side: #ffffff; --card: #ffffff; --card-hi: #f3f4f7;
  --surface: #eceef2; --line: #e4e6eb; --line-hi: #d3d7df;
  --ink: #12141a; --prose: #3b404c; --muted: #646a79; --dim: #8b909c;
  --accent: #0b7a5a; --accent-fill: #12a37a; --neg: #cc2f40;
  --theme-primary: #4f5ef7;
  --c-rh: #2a78d6; --c-base: #eb6834; --c-sol: #1baf7a; --c-bnb: #eda100;
  --shadow: rgba(20, 24, 40, .14);
}
[data-theme="light-blue"] {
  --bg: #eef4fd; --side: #f8fbff; --card: #ffffff; --card-hi: #f1f6fe;
  --surface: #e5eefb; --line: #dbe6f6; --line-hi: #c6d6ee;
  --ink: #0f1a2e; --prose: #334360; --muted: #5d6c88; --dim: #8593ab;
  --theme-primary: #3b82f6;
}
[data-theme="light-rose"] {
  --bg: #fcf1f4; --side: #fff8fa; --card: #ffffff; --card-hi: #fdf3f6;
  --surface: #f9e6ec; --line: #f2dbe2; --line-hi: #e8c4d0;
  --ink: #2a1219; --prose: #553440; --muted: #87606d; --dim: #a98692;
  --theme-primary: #e0508a;
}

:root {
  --primary: var(--user-primary, var(--theme-primary));
  --primary-hi: color-mix(in srgb, var(--primary) 82%, #fff);
  --primary-soft: color-mix(in srgb, var(--primary) 22%, transparent);
  --primary-text: color-mix(in srgb, var(--primary) 70%, var(--ink));
  --accent-bg: color-mix(in srgb, var(--accent-fill) 14%, transparent);
  --neg-bg: color-mix(in srgb, var(--neg) 14%, transparent);

  --r: 10px;
  --r-sm: 7px;
  --side-w: 290px;
  --bar-h: 34px;
  --gap: 14px;
  --pad: 16px;

  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --font: var(--sans);
}
[data-radius="sharp"] { --r: 4px; --r-sm: 3px; }
[data-radius="round"] { --r: 16px; --r-sm: 10px; }
[data-font="mono"] { --font: var(--mono); }
[data-font="system"] { --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
[data-density="compact"] { --gap: 10px; --pad: 12px; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
svg { display: block; }
i[data-i] { display: inline-flex; width: 16px; height: 16px; flex: none; }
i[data-i] svg { width: 100%; height: 100%; }

.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; }
.dim { color: var(--dim); }
.pos { color: var(--accent); }
.neg { color: var(--neg); }
.label { font-size: 12.5px; color: var(--prose); font-weight: 500; }

/* ---------- layout ---------- */

.app {
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  grid-template-rows: 1fr var(--bar-h);
  height: 100vh;
  height: 100dvh;
}
.app.is-collapsed { --side-w: 68px; }

/* ---------- sidebar ---------- */

.side {
  grid-row: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--side);
  border-right: 1px solid var(--line);
}
.side-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 74px; padding: 0 18px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand-mark { width: 22px; height: 22px; color: var(--ink); shape-rendering: crispEdges; }
.brand-ver { font-size: 12px; font-weight: 500; color: var(--primary-text); margin-left: -3px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: var(--r-sm);
  color: var(--muted);
}
.icon-btn > svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--surface); color: var(--ink); }

.side-search { display: flex; gap: 6px; align-items: center; padding: 16px 14px 10px; }
.search {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 6px 0 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--muted);
}
.search:focus-within { border-color: var(--line-hi); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); }
.search input::-webkit-search-cancel-button { display: none; }
kbd {
  font: 500 11px var(--mono); padding: 3px 6px; border-radius: 5px;
  background: var(--primary-soft); color: var(--primary-text);
}

.pop-wrap { position: relative; }
.pop {
  position: absolute; z-index: 30; top: calc(100% + 6px); right: 0;
  min-width: 170px; padding: 6px;
  background: var(--card-hi); border: 1px solid var(--line-hi); border-radius: var(--r);
  box-shadow: 0 16px 40px var(--shadow);
}
.pop-up { top: auto; bottom: calc(100% + 6px); left: 0; right: 0; }
.pop-label { padding: 6px 8px 4px; font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.pop button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 8px; border-radius: 6px; text-align: left; color: var(--prose);
}
.pop button:hover { background: var(--surface); color: var(--ink); }
.pop button.is-on { color: var(--ink); }
.pop button.is-on::after { content: '✓'; margin-left: auto; color: var(--accent); }

.launches { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 10px 10px; }
.launch {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 8px; border-radius: var(--r-sm); text-align: left;
}
.launch:hover { background: var(--card); }
.avatar {
  position: relative; flex: none; background: var(--surface);
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  font: 700 12px var(--sans); color: #0b0c0f; overflow: visible;
}
.avatar .chain-pip {
  position: absolute; right: -2px; bottom: -2px;
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--side);
}
.launch-txt { flex: 1; min-width: 0; line-height: 1.25; }
.launch-txt b { display: block; font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.launch-txt span { font-size: 12px; color: var(--muted); }
.badge {
  flex: none; padding: 2px 7px; border-radius: 5px;
  font-size: 11.5px; font-weight: 600;
}
.badge-live { background: var(--accent-bg); color: var(--accent); }
.badge-arch { background: var(--surface); color: var(--muted); }
.badge-ended { background: var(--surface); color: var(--muted); }
.launches-empty { padding: 18px 10px; color: var(--dim); font-size: 13px; text-align: center; }

.features { border-top: 1px solid var(--line); padding: 14px 10px 10px; }
.features-head {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 4px 10px 8px; font-size: 12px; color: var(--muted);
}
.features-head[aria-expanded="false"] i { transform: rotate(-90deg); }
.features-head i { width: 13px; height: 13px; transition: transform .15s; }
.features-list a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--prose); font-size: 14px;
}
.features-list a:hover { background: var(--card); color: var(--ink); }
.features-list a.is-on { color: var(--ink); font-weight: 600; }
.features-list a i { color: var(--muted); }
.features-list a.is-on i { color: var(--ink); }
.tag {
  font: 600 10px var(--mono); font-style: normal; letter-spacing: .06em;
  padding: 2px 6px; border-radius: 5px;
  background: var(--primary-soft); color: var(--primary-text);
}
.tag-new { background: var(--primary-soft); color: var(--primary-text); }

.side-foot { border-top: 1px solid var(--line); padding: 14px; display: grid; gap: 14px; }
.funder {
  display: flex; align-items: center; gap: 9px; width: 100%;
  height: 40px; padding: 0 14px; border-radius: 20px;
  background: var(--card-hi); border: 1px solid var(--line);
  font-weight: 600;
}
.funder:hover { border-color: var(--line-hi); }
.funder-name { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.funder-bal { font-family: var(--mono); font-size: 13px; }
.funder i:last-child { width: 13px; height: 13px; color: var(--muted); }
.wallet-opt .w-bal { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); }

.side-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 16px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.btn i { width: 14px; height: 14px; }
.btn-ghost { background: var(--card); border: 1px solid var(--line-hi); color: var(--ink); }
.btn-ghost:hover { background: var(--surface); }
.btn-primary { background: var(--primary); color: var(--on-primary, #fff); }
.btn-primary:hover { background: var(--primary-hi); }
.btn-danger { background: var(--neg-bg); color: var(--neg); border: 1px solid color-mix(in srgb, var(--neg) 35%, transparent); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* collapsed sidebar: icons only */
.is-collapsed .brand-name, .is-collapsed .brand-ver,
.is-collapsed .side-search, .is-collapsed .launch-txt, .is-collapsed .launch .badge,
.is-collapsed .features-head, .is-collapsed .features-list span, .is-collapsed .features-list .tag,
.is-collapsed .funder-name, .is-collapsed .funder-bal, .is-collapsed .funder i:last-child,
.is-collapsed .side-actions span { display: none; }
.is-collapsed .side-head { padding: 0; flex-direction: column; justify-content: center; gap: 6px; }
.is-collapsed .brand { display: none; }
.is-collapsed .launch, .is-collapsed .features-list a { justify-content: center; }
.is-collapsed .funder { padding: 0; justify-content: center; }
.is-collapsed .side-actions { grid-template-columns: 1fr; }
.is-collapsed .btn { padding: 0; }
.is-collapsed .side-foot { padding: 14px 10px; }

/* ---------- main ---------- */

.main { grid-row: 1; min-width: 0; overflow-y: auto; padding: 18px 16px 24px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.burger { display: none; }

.seg {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.seg button {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 5px;
  font-size: 12.5px; color: var(--muted); white-space: nowrap;
}
.seg button:hover { color: var(--ink); }
.seg button.is-on { background: var(--surface); color: var(--ink); font-weight: 600; }
.chain-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); margin-bottom: var(--gap); }
.kpi { padding: var(--pad) var(--pad) calc(var(--pad) - 2px); min-width: 0; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; }
.muted-ico { color: var(--muted); width: 14px !important; height: 14px !important; }
.kpi-val { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.charts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
[data-charts="stacked"] .charts { grid-template-columns: 1fr; }
.chart-card { padding: 14px 12px 8px; min-width: 0; }
.chart-head { display: flex; justify-content: space-between; align-items: center; padding: 0 2px 6px; }
.chart-modes { display: flex; gap: 2px; }
.chart-modes button { display: grid; place-items: center; width: 26px; height: 24px; border-radius: 5px; color: var(--muted); }
.chart-modes button:hover { color: var(--ink); }
.chart-modes button.is-on { background: var(--primary-soft); color: var(--primary-text); }
.chart-modes i { width: 14px; height: 14px; }
.chart { position: relative; height: 330px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart text { font: 11.5px var(--sans); fill: var(--muted); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .zero { stroke: var(--line-hi); stroke-width: 1; }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .hot { cursor: crosshair; }
.chart .bar { transition: opacity .12s; }
.chart.is-hovering .bar:not(.is-hot) { opacity: .45; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); font-size: 13px; }

.donut-wrap { display: flex; align-items: center; justify-content: center; gap: 36px; height: 100%; flex-wrap: wrap; }
.donut-wrap svg { width: 220px; height: 220px; flex: none; }
.donut-wrap .seg-arc { transition: opacity .12s; }
.donut-wrap.is-hovering .seg-arc:not(.is-hot) { opacity: .4; }
.legend { display: grid; gap: 10px; min-width: 170px; }
.legend-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; font-size: 13px; color: var(--prose); }
.legend-row .sw { width: 10px; height: 10px; border-radius: 3px; }
.legend-row b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.legend-row small { display: block; color: var(--dim); font-size: 11.5px; }

.divider { position: relative; text-align: center; margin: 22px 0 18px; }
.divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.divider span {
  position: relative; padding: 0 12px; background: var(--bg);
  font: 500 10.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim);
}

.lower { display: grid; grid-template-columns: 2fr 1fr; gap: var(--gap); }
.list-card { padding: var(--pad) 12px 12px; min-width: 0; }
.list-card > .card-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 2px; }
.list-card > .mono { display: block; padding: 0 2px; margin: 4px 0 12px; }
.link-btn { font-size: 12px; color: var(--primary-text); }
.link-btn:hover { text-decoration: underline; }
.rows { display: grid; gap: 4px; }
.row {
  display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 14px; align-items: center;
  min-height: 44px; padding: 6px 12px; border-radius: var(--r-sm); background: var(--card-hi);
  text-align: left; width: 100%;
}
.row:hover { background: var(--surface); }
.row .avatar { width: 28px; height: 28px; font-size: 11px; }
.row-main { min-width: 0; line-height: 1.25; }
.row-main b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main span { font-size: 11.5px; color: var(--dim); }
.row .fig { font-size: 12.5px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.row .fig small { display: block; font-size: 10.5px; color: var(--dim); }
.row .state { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-fill); }
.row .state.off { background: var(--dim); }
.site-row { grid-template-columns: 1fr auto auto; }
.site-row[disabled] { cursor: not-allowed; }
.site-row[disabled] b { color: var(--muted); }
.rows-empty { padding: 26px 10px; text-align: center; color: var(--dim); font-size: 13px; }
.rows-empty .btn { margin-top: 12px; }

/* ---------- secondary views ---------- */

.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 4px 0 16px; flex-wrap: wrap; }
.view-head h1 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.view-head p { margin: 4px 0 0; font-size: 13px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input, .field input, .field textarea, .field select {
  height: 36px; padding: 0 12px; min-width: 0;
  background: var(--bg); border: 1px solid var(--line-hi); border-radius: var(--r-sm); outline: 0;
}
.inline-form input { width: 280px; }
.inline-form input:focus, .field input:focus, .field textarea:focus { border-color: var(--primary); }

.table-card { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 11px 14px; white-space: nowrap;
  font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim);
  border-bottom: 1px solid var(--line);
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--card-hi); }
.table .num { text-align: right; }
.table .who { display: flex; align-items: center; gap: 10px; }
.table .who .avatar { width: 26px; height: 26px; font-size: 10.5px; }
.table .who .avatar .chain-pip { width: 10px; height: 10px; border-color: var(--card); }
.table .addr { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.table .act { text-align: right; }
.table .act button { color: var(--muted); padding: 4px 8px; border-radius: 5px; font-size: 12px; }
.table .act button:hover { background: var(--surface); color: var(--ink); }
.table-empty { padding: 36px; text-align: center; color: var(--dim); }
.chain-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--prose); }

.market { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--gap); }
.offer { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.offer-ico { width: 36px; height: 36px; border-radius: var(--r-sm); font: 700 13px var(--sans); display: grid; place-items: center; background: var(--surface); color: var(--prose); }
.offer h3 { margin: 0; font-size: 15px; }
.offer p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; }
.offer-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.offer-foot b { font-family: var(--mono); font-size: 13px; }
.offer.is-soon { opacity: .6; }

/* ---------- status bar ---------- */

.statusbar {
  grid-column: 1 / -1; grid-row: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 14px; border-top: 1px solid var(--line); background: var(--side);
  font-size: 12px; min-width: 0;
}
.sb-left { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-fill); box-shadow: 0 0 0 3px var(--accent-bg); }
.live-dot.off { background: var(--neg); box-shadow: 0 0 0 3px var(--neg-bg); }
.sb-ok.off { color: var(--neg); }
.sb-ok { color: var(--accent); }
.sb-ok b { font-weight: 600; }
.sb-prices { display: flex; gap: 20px; white-space: nowrap; }
.sb-prices .coin { display: inline-flex; align-items: center; gap: 6px; }
.sb-prices .coin .logo { width: 16px; height: 16px; }
.sb-prices .coin b { font: 600 12.5px var(--sans); color: var(--ink); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.sb-prices .coin i { display: inline-flex; width: 13px; height: 13px; }
.sb-prices .coin i svg { width: 100%; height: 100%; }
.sb-prices .up { color: var(--accent-fill); }
.sb-prices .down { color: var(--neg); }
.sb-prices .sb-unit { font-size: 11px; color: var(--muted); margin-left: -3px; }
.sb-right { display: flex; align-items: center; gap: 4px; }
.sb-link { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 5px; color: var(--muted); white-space: nowrap; font-size: 12px; }
.sb-link:hover { color: var(--ink); background: var(--card); }
.sb-link i { width: 13px; height: 13px; }
.sb-settings { background: var(--card); color: var(--prose); }

/* ---------- tooltip, modal, toast ---------- */

.tip {
  position: fixed; z-index: 60; pointer-events: none;
  padding: 8px 10px; min-width: 120px;
  background: var(--card-hi); border: 1px solid var(--line-hi); border-radius: var(--r-sm);
  box-shadow: 0 10px 30px var(--shadow);
  font-size: 12px; color: var(--prose);
}
.tip b { display: block; font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.tip .tip-row { display: flex; align-items: center; gap: 6px; margin-top: 3px; }

.modal {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: 16px;
  background: color-mix(in srgb, var(--bg) 60%, transparent); backdrop-filter: blur(6px);
}
.modal-box {
  width: min(480px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--card); border: 1px solid var(--line-hi); border-radius: 14px;
  box-shadow: 0 30px 80px var(--shadow);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 0 20px; }
.modal-head h2 { margin: 0; font-size: 16px; }
.modal-body { padding: 14px 20px 20px; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 12px; color: var(--muted); }
.field textarea { height: 70px; padding: 9px 12px; resize: vertical; }
.field .err { color: var(--neg); font-size: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--prose); }
.check input { accent-color: var(--primary); width: 16px; height: 16px; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat { padding: 12px; background: var(--card-hi); border-radius: var(--r-sm); }
.stat span { display: block; font-size: 11.5px; color: var(--dim); }
.stat b { font-size: 15px; font-variant-numeric: tabular-nums; }
.activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.activity li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.activity li:last-child { border-bottom: 0; }
.activity time { color: var(--dim); font-size: 12px; white-space: nowrap; }

.toasts { position: fixed; z-index: 70; right: 16px; bottom: calc(var(--bar-h) + 12px); display: grid; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--card-hi); border: 1px solid var(--line-hi);
  box-shadow: 0 12px 30px var(--shadow); font-size: 13px;
  animation: toast-in .18s ease-out;
}
.toast::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-fill); flex: none; }
.toast.is-err::before { background: var(--neg); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

.scrim { display: none; }

/* ---------- responsive ---------- */

@media (max-width: 1280px) {
  .lower { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .charts { grid-template-columns: 1fr; }
  .sb-right .sb-link span { display: none; }
  .sb-right .sb-settings span { display: inline; }
}
@media (max-width: 860px) {
  .app, .app.is-collapsed { grid-template-columns: 1fr; --side-w: 290px; }
  .side {
    position: fixed; z-index: 40; top: 0; bottom: var(--bar-h); left: 0;
    width: min(290px, 86vw);
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .app.is-menu .side { transform: none; }
  .app.is-menu .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: color-mix(in srgb, var(--bg) 55%, transparent); }
  #collapse { display: none; }
  .burger { display: inline-grid; }
  .topbar { justify-content: flex-start; }
  .seg { max-width: 100%; overflow-x: auto; }
  .sb-prices { display: none; }
  .inline-form, .inline-form input { width: 100%; }
}
@media (max-width: 520px) {
  .main { padding: 14px 16px 20px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px; }
  .kpi-val { font-size: 19px; }
  .chart { height: 260px; }
  .sb-right .sb-link:not(.sb-settings):not(#activityBtn) { display: none; }
  .sb-ok b { display: none; }
  .row2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- avatars with images ---------- */

.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* ---------- create / launch flow ---------- */

.site-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.site-pick button {
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--card-hi); border: 1px solid var(--line); text-align: left;
}
.site-pick button b { font-size: 13.5px; color: var(--ink); }
.site-pick .site-txt > span { font-size: 11.5px; color: var(--dim); }
.site-pick button.is-on { border-color: var(--primary); background: var(--primary-soft); }
.image-pick {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  border: 1px dashed var(--line-hi); border-radius: var(--r-sm); cursor: pointer;
  color: var(--muted); font-size: 13px;
}
.image-pick:hover { border-color: var(--primary); }
.image-pick .thumb { width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--surface); display: grid; place-items: center; overflow: hidden; flex: none; }
.image-pick .thumb img { width: 100%; height: 100%; object-fit: cover; }
.image-pick input { display: none; }
details.adv summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
details.adv[open] summary { margin-bottom: 12px; }
.note { font-size: 12.5px; color: var(--muted); padding: 10px 12px; border-radius: var(--r-sm); background: var(--card-hi); border: 1px solid var(--line); }
.note.warn { color: var(--neg); background: var(--neg-bg); border-color: transparent; }
.note a { color: var(--primary-text); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.steps li { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.steps li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--line-hi); flex: none; }
.steps li.is-done { color: var(--prose); }
.steps li.is-done::before { background: var(--accent-fill); }
.steps li.is-now { color: var(--ink); }
.steps li.is-now::before { background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); animation: pulse 1s infinite alternate; }
.steps li.is-err { color: var(--neg); }
.steps li.is-err::before { background: var(--neg); }
@keyframes pulse { to { box-shadow: 0 0 0 6px transparent; } }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.links a { font-size: 12.5px; padding: 5px 10px; border-radius: var(--r-sm); background: var(--card-hi); border: 1px solid var(--line); color: var(--prose); }
.links a:hover { border-color: var(--line-hi); color: var(--ink); }
.sell { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.sell span { font-size: 12.5px; color: var(--muted); margin-right: 4px; }

/* ---------- wallets ---------- */

.wallet-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.wallet-card { padding: 18px; display: grid; gap: 12px; align-content: start; }
.wallet-card h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.wallet-card .addr { font-family: var(--mono); font-size: 12px; color: var(--muted); word-break: break-all; }
.bal-row { display: flex; justify-content: space-between; gap: 12px; white-space: nowrap; font-size: 13px; padding: 8px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.bal-row span:first-child { display: flex; align-items: center; gap: 8px; color: var(--prose); }
.wallet-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- customize ---------- */

.modal-box.wide { width: min(520px, 100%); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 -20px 16px; padding: 0 16px; }
.tabs button { padding: 10px 8px; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.is-on { color: var(--ink); font-weight: 600; border-color: var(--primary); }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.theme-opt { border-radius: var(--r-sm); background: var(--card-hi); border: 1px solid var(--line); padding: 4px 4px 8px; text-align: center; font-size: 12.5px; color: var(--prose); }
.theme-opt.is-on { border-color: var(--primary); color: var(--ink); font-weight: 600; }
.theme-prev { position: relative; height: 66px; border-radius: 5px; margin-bottom: 7px; overflow: hidden; }
.theme-prev .pane { position: absolute; left: 22%; right: 0; top: 24%; bottom: 0; border-radius: 4px 0 0 0; padding: 9px 10px; display: grid; gap: 4px; align-content: start; }
.theme-prev .pane i { display: block; height: 3px; border-radius: 2px; }
.theme-prev .dots { position: absolute; right: 7px; top: 6px; display: flex; gap: 3px; }
.theme-prev .dots span { width: 7px; height: 7px; border-radius: 2px; }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-field { flex: 1; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: var(--r-sm); background: var(--card-hi); border: 1px solid var(--line); }
.color-field input[type="color"] { width: 20px; height: 20px; padding: 0; border: 0; background: none; border-radius: 4px; cursor: pointer; }
.color-field input[type="text"] { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font: 600 13px var(--mono); text-transform: uppercase; }
.opt-group { display: grid; gap: 8px; margin-bottom: 16px; }
.opt-group > span { font-size: 12.5px; font-weight: 600; color: var(--prose); }
.opt-group .seg { width: max-content; max-width: 100%; }
.custom-foot { display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line); margin: 18px -20px -20px; padding: 14px 20px; }
.custom-foot .btn-done { margin-left: auto; background: var(--ink); color: var(--bg); }

/* layout options */
[data-side="right"] .app { grid-template-columns: 1fr var(--side-w); }
[data-side="right"] .side { grid-column: 2; border-right: 0; border-left: 1px solid var(--line); }
[data-side="right"] .main { grid-column: 1; grid-row: 1; }
[data-statusbar="off"] .app { grid-template-rows: 1fr 0; }
[data-statusbar="off"] .statusbar { display: none; }
[data-statusbar="off"] { --bar-h: 0px; }

@media (max-width: 860px) {
  .wallet-cards { grid-template-columns: 1fr; }
  .themes { grid-template-columns: 1fr 1fr; }
  [data-side="right"] .app { grid-template-columns: 1fr; }
  [data-side="right"] .main { grid-column: 1; }
  .row { grid-template-columns: auto 1fr auto auto; }
  .row .hide-sm { display: none; }
}

/* ---------- logos ---------- */

img.logo { width: 16px; height: 16px; border-radius: 50%; flex: none; object-fit: cover; }
.site-logo { width: 28px; height: 28px; border-radius: 8px; flex: none; object-fit: cover; }
.site-logo.lg { width: 36px; height: 36px; border-radius: var(--r-sm); }
.site-initial { display: grid; place-items: center; background: var(--surface); color: var(--muted); font-weight: 700; font-size: 13px; }
.offer-ico:has(img) { background: none; }
.site-pick button { display: flex; align-items: center; gap: 10px; }
.site-pick .site-txt { display: grid; gap: 1px; min-width: 0; }
.site-pick .site-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-logo { display: flex; align-items: center; gap: 10px; }
.row-main.row-logo > span { min-width: 0; font-size: inherit; color: var(--ink); }
.row-logo b { display: block; }
.row-logo span span { font-size: 11.5px; color: var(--dim); }

/* ---------- landing ---------- */

.landing {
  position: fixed; inset: 0; z-index: 45; overflow-y: auto; overflow-x: hidden;
  background: var(--bg); color: var(--ink);
}
.ld-sky { position: absolute; inset: 0; height: 100vh; pointer-events: none; overflow: hidden; }
.ld-sky span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; }
.ld-sky { background-image: linear-gradient(color-mix(in srgb, var(--ink) 5%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--ink) 5%, transparent) 1px, transparent 1px); background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 0%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 40%, #000 0%, transparent 75%); }
.ld-sky span:nth-child(1) { width: 50vw; height: 40vh; left: 25vw; top: 10vh; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.ld-sky span:nth-child(2) { display: none; }
.ld-sky span:nth-child(3) { display: none; }

.ld-nav {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 28px;
  max-width: 1180px; margin: 0 auto; padding: 22px 24px;
}
.ld-brand { font-size: 21px; gap: 9px; }
.ld-brand .brand-mark { width: 24px; height: 24px; }
.ld-links { display: flex; gap: 22px; }
.ld-links a { color: var(--prose); font-size: 15px; font-weight: 500; }
.ld-links a:hover { color: var(--ink); }
.ld-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ld-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--prose); }
.ld-icon:hover { background: var(--surface); color: var(--ink); }
.ld-icon i { width: 18px; height: 18px; }
.ld-btn { height: 40px; padding: 0 18px; border-radius: 12px; font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.ld-btn-soft { background: var(--surface); color: var(--ink); }
.ld-btn-soft:hover { background: var(--line-hi); }
.ld-btn-dark { background: var(--ink); color: var(--bg); }
.ld-btn-dark:hover { opacity: .88; }
.ld-actions .pop { min-width: 200px; }
.ld-actions .pop button img { width: 18px; height: 18px; }

.ld-hero {
  position: relative; z-index: 1;
  max-width: 1180px; margin: 0 auto; padding: 7vh 24px 6vh;
  text-align: center;
}
.ld-title {
  margin: 0; font-weight: 800; letter-spacing: -.05em; line-height: .96;
  font-size: clamp(44px, 8vw, 118px);
}
.ld-title span {
  color: var(--muted);
}
.ld-sub { max-width: 560px; margin: 28px auto 0; font-size: 17px; line-height: 1.5; color: var(--prose); }
.ld-cta {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 34px;
  height: 58px; padding: 0 30px; border-radius: 18px;
  background: var(--ink); color: var(--bg); font-size: 19px; font-weight: 700; letter-spacing: -.01em;
  box-shadow: 0 18px 40px var(--shadow);
  transition: transform .15s ease;
}
.ld-cta:hover { transform: translateY(-2px); }
.ld-cta svg { width: 20px; height: 20px; shape-rendering: crispEdges; }
.ld-pads { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 26px; font-size: 13.5px; color: var(--muted); }
.ld-pads span { display: inline-flex; align-items: center; gap: 7px; }
.ld-pads img { width: 18px; height: 18px; border-radius: 50%; }

/* floating logos */
.ld-orbs { position: absolute; top: 0; bottom: 0; left: -70px; right: -70px; pointer-events: none; }
.orb {
  position: absolute; left: var(--x); top: var(--y);
  width: 96px; height: 96px; margin: -48px 0 0 -48px; object-fit: contain;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .35));
  animation: orb-float 7s ease-in-out infinite;
  animation-delay: var(--d);
}
[data-theme^="light"] .orb { filter: drop-shadow(0 14px 18px rgba(20, 24, 40, .18)); }
@keyframes orb-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(0, -16px, 0) rotate(5deg); }
}

/* hot right now */
.ld-hot { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 10px 24px 48px; }
.ld-hot-head { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ld-hot-head h2 { margin: 0; font-size: 27px; letter-spacing: -.02em; }
.ld-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ld-chips button {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 13px; border-radius: 16px;
  border: 1px solid var(--line-hi); color: var(--prose); font-size: 13px;
}
.ld-chips button img { width: 15px; height: 15px; border-radius: 50%; }
.ld-chips button.is-on { background: var(--accent-bg); border-color: color-mix(in srgb, var(--accent-fill) 50%, transparent); color: var(--ink); }
.ld-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.hot-card {
  display: grid; gap: 10px; padding: 16px; border-radius: 16px; text-align: left;
  background: var(--card); border: 1px solid var(--line);
  transition: border-color .15s, transform .15s;
}
.hot-card:hover { border-color: var(--line-hi); transform: translateY(-2px); }
.hot-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hot-ico { position: relative; width: 40px; height: 40px; flex: none; }
.hot-ico > img, .hot-ico > span { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--surface); font-weight: 700; color: var(--muted); }
.hot-ico .hot-chain { position: absolute; right: -3px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%; border: 2px solid var(--card); }
.hot-name { min-width: 0; flex: 1; line-height: 1.25; }
.hot-name b { display: block; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot-name span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot-rank { align-self: flex-start; font-size: 12px; color: var(--dim); }
.hot-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.hot-row b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.hot-skel { height: 168px; border-radius: 16px; background: linear-gradient(90deg, var(--card), var(--card-hi), var(--card)); background-size: 200% 100%; animation: skel 1.2s linear infinite; }
@keyframes skel { to { background-position: -200% 0; } }
.ld-foot { margin: 22px 0 0; text-align: center; font-size: 12px; color: var(--dim); }
.ld-empty { grid-column: 1 / -1; padding: 30px; text-align: center; color: var(--dim); }

@media (max-width: 1100px) {
  .ld-cards { grid-template-columns: repeat(3, 1fr); }
  .ld-links { display: none; }
  .orb { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
}
@media (max-width: 680px) {
  .ld-nav { padding: 16px; gap: 10px; }
  .ld-nav .ld-btn-soft { display: none; }
  .ld-hero { padding: 4vh 16px 6vh; }
  .ld-cards { grid-template-columns: 1fr 1fr; }
  .ld-hot { padding: 10px 16px 40px; }
  .ld-hero { padding-top: 4vh; }
  .ld-orbs { position: static; display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin: 0 auto 30px; max-width: 300px; }
  .orb { position: relative; left: auto; top: auto; margin: 0; width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } }

/* ---------- P&L calendar ---------- */

.cal-btn { display: grid; place-items: center; width: 26px; height: 26px; margin: -4px -6px -4px 0; border-radius: 6px; color: var(--muted); }
.cal-btn:hover { background: var(--surface); color: var(--ink); }
.cal-btn i { width: 15px; height: 15px; }
.modal-box.cal-box { width: min(820px, 100%); }
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 14px; font: 500 13px var(--mono); color: var(--prose); }
.cal-nav button { width: 26px; height: 26px; border-radius: 6px; color: var(--muted); font-size: 17px; }
.cal-nav button:hover { background: var(--surface); color: var(--ink); }
.cal-tools { display: flex; align-items: center; gap: 4px; }
.cal-total { padding: 4px 10px; border-radius: 6px; font-weight: 700; font-size: 13px; background: var(--surface); color: var(--muted); margin-right: 4px; }
.cal-total.is-pos { background: var(--accent-bg); color: var(--accent); }
.cal-total.is-neg { background: var(--neg-bg); color: var(--neg); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid.is-year { grid-template-columns: repeat(4, 1fr); }
.cal-head { padding: 6px 0 8px; text-align: center; font: 500 12px var(--mono); color: var(--muted); }
.cal-day {
  position: relative; display: grid; place-items: center; align-content: center; gap: 6px;
  min-height: 92px; padding: 22px 6px 8px; border-radius: 6px; background: var(--card-hi);
  font-variant-numeric: tabular-nums; text-align: center;
}
.cal-month { min-height: 96px; cursor: pointer; border: 1px solid transparent; }
.cal-month:hover { border-color: var(--line-hi); }
.cal-num { position: absolute; left: 9px; top: 7px; font: 500 12px var(--mono); color: var(--dim); }
.cal-month .cal-num { color: var(--prose); }
.cal-day b { font: 600 13.5px var(--mono); color: var(--muted); }
.cal-n { font: 500 11.5px var(--mono); color: var(--muted); }
.cal-day.is-pos { background: var(--accent-bg); }
.cal-day.is-pos b, .cal-day.is-pos .cal-n, .cal-day.is-pos .cal-num { color: var(--accent); }
.cal-day.is-neg { background: var(--neg-bg); }
.cal-day.is-neg b, .cal-day.is-neg .cal-n, .cal-day.is-neg .cal-num { color: var(--neg); }
.cal-day.is-future { opacity: .55; }
.cal-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.cal-pill { padding: 5px 12px; border-radius: 14px; border: 1px solid var(--line-hi); font-size: 12.5px; color: var(--prose); }
.cal-pill b { color: var(--ink); }
.cal-brand { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.cal-brand svg { width: 18px; height: 18px; shape-rendering: crispEdges; }
@media (max-width: 680px) {
  .cal-day { min-height: 58px; padding: 18px 2px 6px; }
  .cal-day b { font-size: 10.5px; }
  .cal-n { display: none; }
  .cal-grid.is-year { grid-template-columns: repeat(3, 1fr); }
  .cal-brand { display: none; }
}

/* ---------- launch panel chart ---------- */

.modal-box.launch-box { width: min(680px, 100%); }
.chart-embed { position: relative; height: 340px; margin: 0 0 14px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); background: var(--card-hi); }
.chart-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 680px) { .chart-embed { height: 280px; } }

/* ---------- legal ---------- */

.legal { font-size: 13.5px; line-height: 1.55; color: var(--prose); }
.legal h3 { margin: 16px 0 4px; font-size: 14px; color: var(--ink); }
.legal p { margin: 0 0 8px; }
.legal-list { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 8px; }
.ld-legal { margin-top: 8px; }
.ld-legal a { color: var(--prose); text-decoration: underline; }
.check a { color: var(--primary-text); text-decoration: underline; }

/* ---------- trade panel ---------- */

.trade { padding: 14px; margin: 0 0 14px; border-radius: var(--r-sm); background: var(--card-hi); border: 1px solid var(--line); display: grid; gap: 12px; }
.trade-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.trade-slip { width: 38px; height: 22px; padding: 0 4px; margin: 0 2px; border-radius: 5px; border: 1px solid var(--line-hi); background: var(--bg); text-align: center; font-size: 12px; }
.trade-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trade-amt { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--line-hi); background: var(--bg); }
.trade-amt input { width: 90px; background: none; border: 0; outline: 0; font-variant-numeric: tabular-nums; }
.trade-amt span { font-size: 12px; color: var(--muted); }
.trade-row [data-trade="buy"] { margin-left: auto; }
.trade .steps:empty { display: none; }
