:root {
  --ground: #f3f6f5;
  --surface: #ffffff;
  --sunk: #eaf0ee;
  --ink: #142320;
  --ink-2: #4c5f5a;
  --line: #d6e0dd;
  --accent: #0f8a74;
  --accent-ink: #ffffff;
  --good: #11804a;
  --bad: #c2362f;
  --warn: #a8670b;
  --radius: 10px;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0c1311; --surface: #121c19; --sunk: #0f1715; --ink: #e2ece9; --ink-2: #93a7a1; --line: #23332f;
    --accent: #5fdcc0; --accent-ink: #062019; --good: #4fd18b; --bad: #ff7a70; --warn: #f0b65a;
  }
}
:root[data-theme="dark"] {
  --ground: #0c1311; --surface: #121c19; --sunk: #0f1715; --ink: #e2ece9; --ink-2: #93a7a1; --line: #23332f;
  --accent: #5fdcc0; --accent-ink: #062019; --good: #4fd18b; --bad: #ff7a70; --warn: #f0b65a;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font: 14px/1.45 var(--sans); }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: 17px; letter-spacing: 0.01em; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); }
h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); margin-top: 6px; }
a { color: var(--accent); }
.muted, .hint, .note, .sub { color: var(--ink-2); }
.hint { font-size: 12px; }
.note { font-size: 12px; margin: 0; }
.n, .mono, .v, td.n, .log, .addr { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.bar { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; padding: 14px 20px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.brand { display: flex; gap: 10px; align-items: center; }
.mark { width: 22px; height: 22px; border-radius: 6px; background: conic-gradient(from 210deg, var(--accent), transparent 70%, var(--accent)); border: 1px solid var(--accent); }
.sub { margin: 0; font-size: 12px; }
.state { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 200px; }
.phase { color: var(--ink-2); font-size: 13px; }
.pill { font: 500 12px var(--mono); padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); text-transform: uppercase; letter-spacing: 0.06em; }
.pill.running { color: var(--good); border-color: currentColor; }
.pill.stopping { color: var(--warn); border-color: currentColor; }
.pill.stopped { color: var(--ink-2); }
.controls { display: flex; gap: 8px; }

button { font: 500 13px var(--sans); padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.danger { color: var(--bad); }
button.danger:hover:not(:disabled) { border-color: var(--bad); }
button:disabled { opacity: 0.45; cursor: default; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.stats > div { background: var(--surface); padding: 12px 20px; display: grid; gap: 2px; }
.k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); }
.v { font-size: 20px; font-weight: 500; }
.h { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.pos { color: var(--good); }
.neg { color: var(--bad); }

.grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; padding: 16px 20px 40px; align-items: start; }
.col { display: grid; gap: 16px; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 10px; min-width: 0; }
.head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.end .note { margin-right: auto; }

.live.empty { color: var(--ink-2); }
.live .title { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.live .sym { font: 600 20px var(--sans); }
.live .facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px 16px; margin-top: 10px; }
.live .facts div { display: grid; }
.steps { display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.steps span { font: 11px var(--mono); padding: 2px 7px; border-radius: 4px; background: var(--sunk); color: var(--ink-2); }
.steps span.on { background: var(--accent); color: var(--accent-ink); }
.steps span.done { color: var(--ink); }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th.n, td.n { text-align: right; }
tr.failed td { color: var(--ink-2); }
.tag { font: 11px var(--mono); padding: 1px 6px; border-radius: 4px; background: var(--sunk); }

.settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; }
.settings .group { grid-column: 1 / -1; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-top: 6px; padding-bottom: 2px; border-bottom: 1px solid var(--line); }
.settings label { display: grid; gap: 3px; font-size: 12px; min-width: 0; }
.settings .lbl { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings .q { font-style: normal; display: inline-block; width: 13px; height: 13px; line-height: 13px; text-align: center; border-radius: 50%; border: 1px solid var(--line); font-size: 9px; color: var(--ink-2); vertical-align: 1px; cursor: help; }
.settings input, .settings select { padding: 5px 8px; font-size: 13px; }
label { display: grid; gap: 3px; font-size: 12px; color: var(--ink-2); min-width: 0; }
label small { font-size: 11px; line-height: 1.3; }
input, select, textarea { font: 13px var(--sans); color: var(--ink); background: var(--sunk); border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; width: 100%; min-width: 0; }
.settings input { font-family: var(--mono); }
textarea { resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.add { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
details.bulk { border-top: 1px solid var(--line); padding-top: 8px; display: grid; gap: 8px; }
details.bulk[open] { gap: 8px; }
summary { cursor: pointer; font-size: 13px; }

.queue, .wallets { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 260px; overflow-y: auto; }
.queue li, .wallets li { display: flex; gap: 10px; align-items: center; padding: 5px 8px; background: var(--sunk); border-radius: 6px; font-size: 13px; }
.queue li .grow, .wallets li .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue img { width: 26px; height: 26px; border-radius: 5px; object-fit: cover; background: var(--line); }
.queue button { padding: 2px 8px; font-size: 12px; }
.treasury { display: grid; gap: 4px; padding: 10px; background: var(--sunk); border-radius: 8px; }
.addr { font-size: 12px; overflow-wrap: anywhere; }

.log { margin: 0; max-height: 280px; overflow: auto; font-size: 12px; line-height: 1.5; background: var(--sunk); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
#rehearsal ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 3px; font-size: 13px; }
#rehearsal .ok::before { content: "ok"; color: var(--good); font: 11px var(--mono); margin-right: 8px; }
#rehearsal .bad::before { content: "fail"; color: var(--bad); font: 11px var(--mono); margin-right: 8px; }
#rehearsal .sum { font-weight: 500; margin-top: 6px; }

dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 18px; width: min(360px, 92vw); }
dialog form { display: grid; gap: 10px; }
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }

@media (max-width: 960px) {
  .grid { grid-template-columns: 1fr; padding: 12px 16px 32px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bar { padding: 12px 16px; }
}
@media (max-width: 520px) {
  .settings, .two, .three { grid-template-columns: 1fr; }
  .controls { width: 100%; }
  .controls button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
label.inline { display: flex; align-items: center; gap: 8px; }
label.inline input { width: 3.5em; }
tr.coin { cursor: pointer; }
tr.coin:hover td { background: var(--sunk); }
.caret { display: inline-block; width: 1em; color: var(--ink-2); }
tr.detail > td { white-space: normal; background: var(--sunk); padding: 10px 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 8px; }
.chips span { display: grid; gap: 1px; }
.chips i { font-style: normal; font-size: 11px; color: var(--ink-2); }
.chips b { font: 500 13px var(--mono); font-variant-numeric: tabular-nums; }
table.coin-tx { font-size: 12px; }
table.coin-tx td, table.coin-tx th { padding: 3px 6px; white-space: normal; overflow-wrap: anywhere; }
table.coin-tx tr.our td { font-weight: 500; }
.live .chips, .live table.coin-tx { margin-top: 8px; }

/* History: ten coins a page, one open at a time, small rows, and never a sideways scroll. Sized by the card, not the window. */
.coins-wrap, .tx-wrap { container-type: inline-size; }
/* the trade list lives in a fixed window: it scrolls, the header stays, and a coin with a hundred rows takes no more room than one with ten */
.tx-wrap { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.tx-wrap table.coin-tx { margin-top: 0; }
.tx-wrap table.coin-tx thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
details.plumbing .tx-wrap { max-height: 240px; }
details.holders > summary { color: var(--ink); }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 8px; }
.pager[hidden] { display: none; }
.pager-btns { display: flex; gap: 4px; }
.pager button { padding: 3px 9px; font-size: 12px; }
table.coins { font-size: 12px; }
table.coins th { white-space: normal; padding: 3px 5px; font-size: 10px; vertical-align: bottom; }
table.coins td { padding: 3px 5px; white-space: normal; }
table.coins td.t-time, table.coins td.n { white-space: nowrap; }
table.coins td.t-exit { overflow-wrap: anywhere; min-width: 90px; }
tr.detail > td { padding: 6px 8px; }
.chips { gap: 3px 14px; margin-bottom: 5px; }
.chips i { font-size: 10px; }
.chips b { font-size: 11.5px; }
table.coin-tx { font-size: 11px; }
table.coin-tx th { font-size: 9.5px; }
table.coin-tx td, table.coin-tx th { padding: 1px 4px; }
table.coin-tx td.n { white-space: nowrap; }
@container (max-width: 760px) {
  /* only the history list itself: the transaction table nested inside an opened coin keeps its own layout (11/9: it was squeezed into one-letter columns) */
  table.coins, table.coins > tbody { display: block; }
  table.coins > thead { display: none; }
  /* two lines per coin: when, what and profit, then the numbers */
  table.coins tr.coin { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 9px; padding: 4px 2px; border-bottom: 1px solid var(--line); }
  table.coins tr.coin::after { content: ""; flex-basis: 100%; height: 0; order: 0; }
  table.coins tr.coin td { display: block; padding: 0; border: 0; order: 1; font-size: 11px; color: var(--ink-2); white-space: nowrap; background: none; }
  table.coins tr.coin:hover { background: var(--sunk); }
  table.coins tr.coin > td[data-l]::before { content: attr(data-l) " "; font-size: 10px; }
  table.coins tr.coin td.t-time { order: -3; font-size: 11px; }
  table.coins tr.coin td.t-coin { order: -2; font-size: 13px; font-weight: 600; }
  table.coins tr.coin td.t-profit { order: -1; margin-left: auto; font-size: 13px; font-weight: 600; color: inherit; }
  table.coins tr.coin td.t-profit.pos { color: var(--good); }
  table.coins tr.coin td.t-profit.neg { color: var(--bad); }
  table.coins tr.coin td.t-time::before, table.coins tr.coin td.t-coin::before, table.coins tr.coin td.t-profit::before { content: none; }
  table.coins tr.coin td.t-exit { order: 2; white-space: normal; overflow-wrap: anywhere; min-width: 0; }
  table.coins tr.detail { display: block; }
  table.coins tr.detail > td { display: block; }
}
@container (max-width: 640px) {
  table.coin-tx, table.coin-tx tbody { display: block; }
  table.coin-tx thead { display: none; }
  /* two lines per transaction: where and what, then the timing */
  table.coin-tx tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; padding: 2px 0; border-bottom: 1px solid var(--line); }
  table.coin-tx tr::after { content: ""; flex-basis: 100%; height: 0; order: 0; }
  /* each cell keeps its own width: overflow-wrap:anywhere (set for the wide table) let flex shrink a cell to one letter per line */
  table.coin-tx td { display: block; padding: 0; border: 0; order: 1; font-size: 10.5px; color: var(--ink-2); white-space: nowrap; overflow-wrap: normal; flex: 0 0 auto; min-width: 0; }
  table.coin-tx td[data-l="First relay"] { white-space: normal; }
  table.coin-tx td[data-l]::before { content: attr(data-l) " "; font-size: 9.5px; font-weight: 400; }
  table.coin-tx td[data-l="After launch"] { order: -4; font-size: 11.5px; color: inherit; }
  table.coin-tx td[data-l="Who"] { order: -3; font-size: 11.5px; color: inherit; }
  table.coin-tx td[data-l="What"] { order: -2; font-size: 11.5px; color: inherit; white-space: normal; flex: 1 1 auto; min-width: 12ch; }
  table.coin-tx td[data-l="HYPE"] { order: -1; margin-left: auto; font-size: 11.5px; color: inherit; }
  table.coin-tx td[data-l="After launch"]::before, table.coin-tx td[data-l="Who"]::before, table.coin-tx td[data-l="What"]::before, table.coin-tx td[data-l="HYPE"]::before { content: none; }
}
.fleet { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.fleet li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: var(--sunk); border-radius: 6px; }
.fleet .grow { flex: 1; min-width: 0; }
.fleet small { display: block; }
.live hr.sep { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
/* strangers' trades stand out: buys green, sells red */
table.coin-tx tr.obuy td { color: var(--good); }
table.coin-tx tr.osell td { color: var(--bad); }
table.coin-tx tr.obuy td[data-l="What"], table.coin-tx tr.osell td[data-l="What"] { font-weight: 600; }
/* housekeeping transactions fold away under one line */
details.plumbing { margin-top: 8px; }
details.plumbing > summary { cursor: pointer; font-size: 12px; color: var(--ink-2); padding: 4px 0; }
details.plumbing[open] > summary { margin-bottom: 4px; }

/* settings: number fields carry +/- buttons that nudge by the field's step; the rarely changed knobs fold under Advanced */
.settings .num { display: flex; align-items: stretch; }
.settings .num input { flex: 1 1 auto; min-width: 0; border-radius: 0; text-align: center; }
.settings .num button { flex: 0 0 26px; font: 500 14px var(--mono); line-height: 1; color: var(--ink-2); background: var(--sunk); border: 1px solid var(--line); cursor: pointer; padding: 0; }
.settings .num button:first-child { border-radius: 6px 0 0 6px; border-right: 0; }
.settings .num button:last-child { border-radius: 0 6px 6px 0; border-left: 0; }
.settings .num button:hover { color: var(--ink); background: var(--surface); }
.settings details.advanced { grid-column: 1 / -1; margin-top: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.settings details.advanced > summary { cursor: pointer; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); }
.settings details.advanced > .inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; margin-top: 8px; }
.head .ghost.small { margin-left: auto; font-size: 12px; padding: 4px 10px; }
@media (max-width: 1100px) { .settings, .settings details.advanced > .inner { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .settings, .settings details.advanced > .inner { grid-template-columns: 1fr; } }

.controls .agent-toggle, .agent-toggle { display: inline-flex; flex: 0 0 auto; flex-direction: row; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); cursor: pointer; white-space: nowrap; width: auto; }
.controls .agent-toggle input, .agent-toggle input { display: inline-block; width: 15px; height: 15px; flex: 0 0 15px; margin: 0; accent-color: var(--accent); }

/* one coin on several chains */
.fl-rows { display: grid; gap: 6px; }
.fl-row { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(90px, 1fr) minmax(0, 1.4fr); gap: 8px; align-items: center; }
.fl-pick { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; white-space: nowrap; }
.fl-pick input { width: auto; accent-color: var(--accent); }
.fl-custom { display: grid; gap: 8px; }
.fl-custom[hidden] { display: none; }
/* the multi-chain card folds, closed by default; the summary is the card's head */
#fleet-fold > summary { cursor: pointer; list-style: none; }
#fleet-fold > summary::-webkit-details-marker { display: none; }
#fleet-fold > summary h2::before { content: "\25B8"; display: inline-block; width: 1em; color: var(--ink-2); }
#fleet-fold[open] > summary h2::before { content: "\25BE"; }
#fleet-fold[open] > summary { margin-bottom: 10px; }
/* the treasury Send row, right under the treasury */
.send-row { display: grid; gap: 6px; margin: 8px 0 4px; }
#wd-to { font-family: var(--mono); }

/* the coin, where it launches, and the queue: one card */
.fl-coin { border-top: 0; padding-top: 0; }
.fl-queue { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.fl-queue .head h3 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }

/* ── Coin and launch v2: the coin and the AI maker on the left, where to launch and the queue on the right ── */
.coin-card #fleet-fold > summary { padding-bottom: 2px; }
.cl-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px 22px; margin-top: 4px; }
.cl-col { display: grid; gap: 10px; align-content: start; min-width: 0; }
.cl-col + .cl-col { border-left: 1px solid var(--line); padding-left: 22px; }
.cl-sub { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cl-sub .hint { font-weight: 400; letter-spacing: 0; text-transform: none; }
.cl-form { display: grid; gap: 10px; }
.cl-ident { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: start; }
.cl-fields { display: grid; gap: 10px; min-width: 0; }
.cl-logo { width: 112px; height: 112px; border-radius: 12px; border: 1px dashed var(--line); background: var(--sunk); display: grid; place-items: center; overflow: hidden; text-align: center; }
.cl-logo span { font-size: 12px; color: var(--ink-2); padding: 8px; }
.cl-logo img { width: 100%; height: 100%; object-fit: cover; }
.cl-links > summary, .coin-card .bulk > summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
.cl-links[open] > summary { margin-bottom: 8px; }
.cl-ai { display: grid; gap: 10px; padding: 12px; border-radius: var(--radius); background: var(--sunk); }
.cl-ai textarea, .cl-ai select { background: var(--surface); }
.cl-refs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cl-pick { display: inline-flex; align-items: center; font-size: 13px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.cl-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cl-pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.cl-thumbs { display: flex; gap: 6px; }
.cl-thumbs figure { margin: 0; position: relative; width: 40px; height: 40px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.cl-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.cl-thumbs button { position: absolute; inset: auto 0 0 auto; padding: 0 4px; font-size: 11px; line-height: 16px; border-radius: 6px 0 0 0; }
.cl-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cl-tools select { width: auto; flex: 0 0 auto; }
.cl-ideas { display: grid; gap: 6px; }
.cl-ideas:empty { display: none; }
.cl-idea { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.cl-idea:hover, .cl-idea[aria-pressed="true"] { border-color: var(--accent); }
.cl-idea b { font-size: 13px; } .cl-idea span { font-size: 12px; color: var(--ink-2); }
.cl-ai .note:empty { display: none; }
.coin-card .fl-rows { display: grid; gap: 4px; }
.coin-card .fl-row { display: grid; grid-template-columns: minmax(104px, auto) minmax(0, 1fr) minmax(0, 1.1fr); gap: 8px; align-items: center; padding: 4px 8px; border-radius: 8px; background: var(--sunk); }
.coin-card .fl-row select { padding-top: 4px; padding-bottom: 4px; font-size: 13px; }
.coin-card .fl-row .hint { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.cl-actions .note { margin-right: auto; }
.coin-card .queue { max-height: 200px; }
@media (max-width: 1180px) { .cl-grid { grid-template-columns: minmax(0, 1fr); } .cl-col + .cl-col { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; } }
@media (max-width: 520px) { .cl-ident { grid-template-columns: 80px minmax(0, 1fr); } .cl-logo { width: 80px; height: 80px; } .coin-card .fl-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .coin-card .fl-row .hint { grid-column: 1 / -1; } }
/* the TRENCHY / Random quick fills beside "The coin" */
.cl-quick { display: inline-flex; gap: 6px; margin-left: 10px; vertical-align: middle }
.cl-quick .tiny { padding: 2px 9px; font-size: 11px; line-height: 18px; min-height: 0; height: auto; border-radius: 6px; letter-spacing: .04em }

/* the USD override across all engines */
.usd-all { display: grid; gap: 8px; margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 8px }
.usd-switch { display: flex; align-items: center; gap: 8px; font-weight: 600 }
.usd-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px }
.usd-fields label { font-size: 12px }
.usd-fields input { width: 100% }
.usd-all:has(#usd-on:not(:checked)) .usd-fields { opacity: .55 }

/* USD figures and the shared recipe */
.usd { display: block; font-size: 11px; opacity: .62; font-variant-numeric: tabular-nums; margin-top: 2px }
td .usd { display: inline; margin-left: 6px }
.settings label.local { opacity: .38 }
#btn-recipe.on { border-color: var(--accent, #7aa2ff); color: var(--accent, #7aa2ff) }
.head.shared .hint { color: var(--accent, #7aa2ff); font-weight: 600 }

/* settings card, tighter, with on/off switches (11/9) */
.head > .hint { margin-right: auto }
.head > button, .head .ghost.small { margin-left: 0 !important }
.settings { gap: 2px 14px }
.settings label { gap: 2px; font-size: 11.5px; padding: 2px 0 }
.settings .group { margin-top: 12px; margin-bottom: 2px }
.settings input, .settings select { padding: 3px 8px; font-size: 12.5px; height: 30px; box-sizing: border-box }
.settings .num button { flex-basis: 26px; height: 30px }
.settings .lbl { display: flex; align-items: center; gap: 6px }
.settings input.sw { appearance: none; -webkit-appearance: none; flex: 0 0 26px; width: 26px; height: 14px; padding: 0; margin: 0; border-radius: 999px; border: 1px solid var(--line); background: var(--sunk); position: relative; cursor: pointer; transition: background .15s }
.settings input.sw::after { content: ""; position: absolute; top: 1px; left: 1px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-2); transition: transform .15s, background .15s }
.settings input.sw:checked { background: var(--accent); border-color: var(--accent) }
.settings input.sw:checked::after { transform: translateX(12px); background: #fff }
.settings input.sw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.settings label.off .num { opacity: .4 }
.settings label.off .lbl { color: var(--ink-3, var(--ink-2)) }

.head .copy-to { width: auto; font-size: 12px; padding: 4px 8px; height: 28px }

/* GMGN chart above the buys and sells (11/9) */
.gmgn-chart { margin: 8px 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--sunk); }
.gmgn-chart > summary { display: flex; align-items: baseline; gap: 8px; padding: 5px 10px; cursor: pointer; list-style: none; font-size: 11px; }
.gmgn-chart > summary::-webkit-details-marker { display: none; }
.gmgn-chart > summary .gc-t { font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.gmgn-chart > summary .gc-t::before { content: "▸ "; }
.gmgn-chart[open] > summary .gc-t::before { content: "▾ "; }
.gmgn-chart > summary .gc-s { color: var(--ink-2); }
.gmgn-chart > summary a { margin-left: auto; font-size: 11px; }
.gmgn-chart iframe { display: block; width: 100%; height: 380px; border: 0; background: #0b0e11; }
@media (max-width: 640px) { .gmgn-chart iframe { height: 300px; } }

/* test wallet in the top bar (11/9): a wallet icon with its balance; the panel drops down under it */
.tw-dd { position: relative; margin-left: 4px; }
.tw-dd .tw-btn { gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 0 12px 0 10px; background: var(--sunk); color: var(--ink); font-variant-numeric: tabular-nums; }
.tw-dd .tw-btn:hover, .tw-dd .tw-btn.on { border-color: var(--accent); color: var(--accent); }
.tw-dd .tw-btn .tt-i { width: 16px; height: 16px; }
.tw-dd .tw-amt { font-weight: 700; }
.tw-dd .tw-unit { color: var(--ink-2); font-size: 11px; }
.tw-dd.tw-float { position: fixed; right: 16px; bottom: 16px; z-index: 60; }
.tw-dd.tw-float .tw-pop { top: auto; bottom: calc(100% + 8px); }
.tw-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; width: 300px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: 0 16px 40px rgba(0,0,0,.22); display: grid; gap: 9px; font-size: 12px; }
.tw-pop[hidden] { display: none; }
.tw-head { display: flex; align-items: baseline; gap: 8px; }
.tw-head b { letter-spacing: .08em; text-transform: uppercase; font-size: 11px; color: var(--accent); }
.tw-sub { color: var(--ink-2); font-size: 11px; }
.tw-bal { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.tw-bal b { font-size: 20px; color: var(--ink); margin-right: 3px; }
.tw-bal .usd { margin-left: 8px; }
.tw-addr { display: flex; align-items: center; gap: 8px; }
.tw-addr code { font-size: 11px; color: var(--ink-2); }
.tw-coin { color: var(--ink-2); }
.tw-row { display: flex; gap: 6px; align-items: center; }
.tw-row input { width: 86px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--sunk); color: var(--ink); font-variant-numeric: tabular-nums; }
.tw-pop button[data-tw] { border: 1px solid var(--line); background: var(--sunk); color: var(--ink); border-radius: 7px; padding: 5px 10px; cursor: pointer; font-size: 12px; }
.tw-pop button[data-tw]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tw-pop button[data-tw="buy"] { background: var(--good); color: #062019; border-color: transparent; font-weight: 600; margin-left: auto; }
.tw-pop button[data-tw="sell"], .tw-pop button[data-tw="sell50"], .tw-pop button[data-tw="sellbag"] { background: var(--bad); color: #fff; border-color: transparent; font-weight: 600; }
.tw-pop button[data-tw="copy"] { margin-left: auto; padding: 2px 8px; font-size: 11px; }
.tw-pop button.tw-ghost { background: transparent; color: var(--ink-2); }
.tw-pop button:disabled { opacity: .45; cursor: default; }
.tw-msg { color: var(--ink-2); min-height: 1em; word-break: break-word; }
.tw-msg.bad { color: var(--bad); }
.tw-bags { display: grid; gap: 5px; border-top: 1px solid var(--line); padding-top: 8px; }
.tw-bags > span { color: var(--ink-2); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.tw-bag { display: flex; align-items: center; gap: 6px; }
.tw-bag code { font-size: 11px; color: var(--ink-2); }
.tw-bag button { margin-left: auto; }
@media (max-width: 640px) { .tw-pop { width: min(300px, calc(100vw - 32px)); } .tw-dd .tw-unit { display: none; } }

/* the wallet dropdown holds the treasury and the test wallet (user, 11/10) */
.tw-pop { width: 420px; max-height: calc(100vh - 64px); overflow-y: auto; padding: 0; gap: 0; }
.tw-sec { display: grid; gap: 9px; padding: 12px 14px; }
.tw-sec + .tw-sec { border-top: 1px solid var(--line); }
.tw-tsec .treasury { margin: 0; }
.tw-tsec h3 { margin: 4px 0 0; }
.tw-tsec .wallets { margin: 0; }
.tw-tsec .row { margin: 0; }
.tw-tsec details.bulk { margin: 0; }
.tw-tsec button[data-tw="copyt"] { padding: 1px 7px; font-size: 11px; border-radius: 6px; margin-left: 4px; }
.tw-dd .tw-test { margin-left: 2px; padding-left: 8px; border-left: 1px solid var(--line); color: var(--ink-2); font-size: 11px; font-weight: 400; }
.tw-dd .tw-test b { color: var(--ink); font-weight: 600; }
@media (max-width: 640px) { .tw-pop { width: min(420px, calc(100vw - 24px)); } .tw-dd .tw-test { display: none; } }
.tw-tsec .treasury > .k { display: none; }

/* open-coin buttons (user, 11/10) */
.ctl-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ctl-row button { padding: 5px 11px; font-size: 12px; }
.ctl-row button.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
