@charset "UTF-8";
:root { color-scheme: dark; --bg:#0b0f15; --surface:#121820; --surface2:#17202b; --border:#28313e; --muted:#8290a3; --text:#e3eaf4; --gold:#e8c87c; --green:#83c5a7; --red:#e88b7c; --blue:#7cb3e8; --orange:#f5a14a; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: var(--blue); }
button, input, select { font: inherit; }
button { cursor: pointer; color: var(--text); background: #1b2430; border: 1px solid #344151; border-radius: 8px; padding: 6px 11px; white-space: nowrap; }
button:hover:not(:disabled) { background: #293646; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: #3a3220; border-color: var(--gold); color: var(--gold); font-weight: 600; }
button:focus-visible, input:focus, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
input { color: var(--text); background: #0e141c; border: 1px solid #344151; border-radius: 8px; padding: 6px 9px; }
input[type=checkbox] { accent-color: var(--gold); width: 15px; height: 15px; vertical-align: -2px; }
.muted { color: var(--muted); }
.help { color: var(--muted); font-size: 12px; margin: 10px 2px 0; }
.tag, .badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); }
.badge.warn { color: var(--gold); border-color: #6b5a33; }
.badge.bad { color: var(--red); border-color: #6b3a33; }
.badge.plat { color: var(--muted); } /* which platform (Flap): grey like any label, colour stays for 全分红 */
/* In a card red means 全分红 only: a status badge (已暂停, 内盘已结束 …) stays neutral there. */
.token .badge.bad, .token .badge.warn { color: var(--muted); border-color: #3a4656; font-weight: 600; }

.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 18px; margin: 0; }
.brand .back { color: var(--muted); text-decoration: none; font-size: 13px; }
.assistant { font-size: 13px; padding: 4px 10px; border-radius: 8px; background: #0e141c; border: 1px solid var(--border); }
.assistant.ready { color: var(--green); border-color: #2f5546; }
.assistant.offline, .assistant.expired, .assistant.unpaired { color: var(--gold); border-color: #6b5a33; }
.assistant.ready.outdated { color: var(--gold); border-color: #6b5a33; }
.helper-update { margin: 8px 0 4px; padding: 8px 10px; border: 1px solid #6b5a33; border-radius: 8px; color: var(--gold); font-size: 13px; line-height: 1.5; }
.helper-update a, .assistant.outdated a { color: inherit; font-weight: 700; text-decoration: underline; }
.settings { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-left: auto; font-size: 13px; color: var(--muted); align-items: center; }
.settings input:not([type=checkbox]) { width: 4.5em; padding: 3px 6px; }
.watch-warm:has(input:checked) { color: var(--gold); font-weight: 600; }
/* 点了直接发: a plain tick box like the others; its second click (「确认打开」) reads like every other armed confirm. */
.direct-toggle:has(input:checked) { color: var(--text); }
.direct-toggle .danger { color: #ff4d4f; font-weight: 700; }
.records-open { padding: 3px 10px; font-size: 12px; }
.records-open .count { margin-left: 6px; padding: 0 6px; border-radius: 99px; background: #2a3442; color: var(--text); font-size: 11px; font-weight: 700; }
/* A fixed toast: a notice must never move the buttons under the pointer. */
.notice { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 20; max-width: min(720px, calc(100vw - 32px)); padding: 9px 14px; border-radius: 10px; background: #1d2733; border: 1px solid #3b4a5c; box-shadow: 0 6px 24px rgba(0,0,0,.45); pointer-events: none; }
.notice.error { color: var(--red); border-color: #6b3a33; }

.layout { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 16px; padding: 16px 20px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.panel-head h2 { font-size: 15px; margin: 0; }

.wallet-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.wallet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); } /* rows never wider than the column (11-05: one-line rows stuck out of it) */
.wallet { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: var(--surface2); }
.wallet.disabled { opacity: .55; }
.wallet-main { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.wallet-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 1 auto; }
.addr { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.wallet .bnb { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.wallet .addr { flex: none; }
/* 钱包分组 + 拖动排序 (wallet-groups.mjs): a row of group buttons above the list; the grip ⠿ sits in the row's left padding,
   outside the tick box's label. */
.wallet-groups { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: -2px 0 8px; }
.wallet-groups button.small { padding: 2px 6px; font-size: 12px; touch-action: none; }
.wallet-groups :is(.group-chip, .group-all) .count { color: var(--muted); font-variant-numeric: tabular-nums; }
.wallet-groups :is(.group-chip, .group-all).on { border-color: var(--text); color: var(--text); font-weight: 700; }
.wallet-groups :is(.group-chip, .group-all).on .count { color: var(--text); }
.wallet-groups .group-add { color: var(--muted); }
.wallet-groups .group-edit { display: inline-flex; align-items: center; gap: 4px; }
.wallet-groups .group-name { width: 8em; padding: 2px 6px; font-size: 12px; }
.wallet-groups .danger { color: #ff4d4f; font-weight: 700; }
.wallet.draggable { position: relative; padding-left: 12px; }
.wallet-grip { position: absolute; left: 1px; top: 11px; padding: 2px 1px; cursor: grab; touch-action: none; user-select: none; color: #5d6b7f; font-size: 11px; line-height: 1; }
.wallet:hover .wallet-grip { color: var(--muted); }
.wallet-grip:hover { color: var(--gold); }
.gates .group-tag, .own-tags .group-tag { padding: 0 6px; border: 1px solid #3a4656; border-radius: 99px; color: var(--text); }
/* 6a: a normal wallet in one line — its 资金 / group tags beside the name, ⋯ for its actions. In a 270 px column (measured
   11-05) the name was squeezed to 0: it keeps at least 4 characters and its … (a shorter name its own width, where the
   browser can say so: calc-size; else 5em), the address gives way first (down to nothing: the whole of it is in ⋯ and on
   hover), then the name down to that, then the tags (all of them on hover); BNB and ⋯ never. An Agent wallet's row is as
   before. Measured at 270 px: 「终测 1 · 资金 未备份 · BNB 0」 shows whole with the address cut to …. */
li.wallet.own-row .wallet-main b { flex: 0 3 auto; min-width: 5em; min-width: calc-size(max-content, min(size, 5em)); }
li.wallet.own-row .wallet-main .addr { flex: 0 1000 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
li.wallet.own-row .wallet-main .own-tags { flex: 0 1 auto; min-width: 0; overflow: hidden; }
.own-tags { display: inline-flex; gap: 4px; font-size: 12px; color: var(--muted); flex: none; white-space: nowrap; }
.wallet-main .own-more { flex: none; padding: 0 6px; font-size: 13px; line-height: 1.4; }
.wallet-main .own-more.on { border-color: var(--text); color: var(--text); }
.own-menu { margin-left: 23px; }
.wallet-list.reordering, .wallet-groups.reordering { user-select: none; cursor: grabbing; }
.wallet.dragging, .group-chip.dragging { opacity: .5; }
.wallet-list [data-drop=before] { box-shadow: inset 0 2px 0 var(--gold); }
.wallet-list [data-drop=after] { box-shadow: inset 0 -2px 0 var(--gold); }
.wallet-groups [data-drop=before] { box-shadow: inset 2px 0 0 var(--gold); }
.wallet-groups [data-drop=after] { box-shadow: inset -2px 0 0 var(--gold); }
.wallet-groups [data-drop=into] { border-color: var(--gold); color: var(--gold); }
.gates { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 4px 0 0 23px; font-size: 12px; color: var(--muted); }
.flag.bad { color: var(--red); }
.blockers { margin: 3px 0 0 23px; font-size: 12px; color: var(--gold); }
.watch-box form { display: flex; gap: 6px; margin-bottom: 8px; }
.watch-box input { flex: 1; min-width: 0; }
.empty { color: var(--muted); padding: 10px 4px; list-style: none; }

.whitelist-status { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
#index-status { font-variant-numeric: tabular-nums; }
#index-status.live::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--green); vertical-align: 1px; }
.whitelist-status.hot { color: var(--gold); }
.search { display: flex; gap: 6px; margin-bottom: 10px; }
.search input { flex: 1; min-width: 0; }
.token-list { display: grid; gap: 8px; max-height: 62vh; overflow-y: auto; padding-right: 4px; align-content: start; }
@media (max-width: 900px) { .token-list { max-height: none; } }
.token { border: 1px solid var(--border); border-radius: 10px; background: var(--surface2); }
.token.open { border-color: #5b6878; }
/* 全分红 (10-25, asked): no frame — its name in red, bold and larger; that is all the colour a card gets. */
.token.pure-dividend .tname .sym, .token.pure-dividend .tname .tn { color: #ff4d4f; font-weight: 800; }
.token.pure-dividend .tname .sym { font-size: 1.3em; }
.token-head { width: 100%; display: grid; grid-template-columns: 40px minmax(180px, 1.5fr) minmax(120px, 1fr) auto auto; grid-template-areas: "icon name bar ptext phase" "icon created created last mine"; gap: 2px 12px; align-items: center; text-align: left; background: transparent; border: 0; border-radius: 10px; padding: 9px 12px; }
.token-head:hover:not(:disabled) { background: #1d2733; }
/* The header is a div (it holds the card's buy buttons): the button look and keyboard focus by hand. */
.token-head { cursor: pointer; color: var(--text); white-space: nowrap; }
.token-head:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.badge-row { display: inline-flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.card-buy { display: inline-flex; gap: 8px; }
.card-btn { min-width: 88px; padding: 7px 16px; font-size: 15px; font-weight: 700; }
.icon { grid-area: icon; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #253040; }
.icon.placeholder { display: grid; place-items: center; background: #253040; color: var(--muted); font-size: 12px; }
.tname { grid-area: name; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; min-width: 0; }
.tname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14em; }
.tname .tn { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14em; }
.token-head { position: relative; }
/* gang V2 / V3 / 打新 in the card's top-left corner (out of the grid), grey: colour stays for 全分红 */
.token-head > .vtag { position: absolute; top: 0; left: 0; z-index: 1; font-size: 10px; line-height: 14px; font-weight: 700; padding: 0 5px; border-radius: 10px 0 6px 0; background: #2a3442; color: var(--muted); pointer-events: none; }
.vtag[hidden] { display: none; }
.qpill { font-size: 11px; padding: 0 7px; border-radius: 99px; border: 1px solid #3a4656; color: var(--muted); white-space: nowrap; }
.qpill.zap { color: var(--text); font-weight: 700; }
.qpill:empty, .tpill:empty { display: none; }
.tpill { font-size: 11px; padding: 0 7px; border-radius: 99px; border: 1px solid #3a4656; color: var(--muted); white-space: nowrap; }
.tpill.risk { border-color: #6b5a33; color: var(--gold); }
/* 全分红: the tax reads red and bold like the name (text only, the pill's border stays neutral). */
.token.pure-dividend .tpill, .token.pure-dividend .tax-text { color: #ff4d4f; font-weight: 800; }
.progress { grid-area: bar; height: 8px; border-radius: 99px; background: #0e141c; border: 1px solid var(--border); overflow: hidden; }
.progress .bar { height: 100%; background: #6f7d8f; }
.ptext { grid-area: ptext; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.phase { grid-area: phase; font-size: 12px; color: var(--muted); white-space: nowrap; }
.phase.live { color: var(--text); }
.created { grid-area: created; font-size: 12px; }
button.copy-ca { margin-left: 6px; font-weight: 600; min-width: 6.5em; }
button.copy-ca.done { color: var(--muted); }
/* 控制台同款: its own framed block under the board's rows, same buttons */
.console-box { display: grid; gap: 6px; margin-top: 8px; padding: 8px 10px; border: 1px dashed #3a4656; border-radius: 10px; background: transparent; }
.console-label { min-width: 3.6em; color: var(--muted); font-weight: 600; font-size: 12px; }

.last { grid-area: last; font-size: 12px; color: var(--muted); }
.mine { grid-area: mine; font-size: 12px; color: var(--text); font-weight: 600; text-align: right; }
@media (max-width: 1180px) {
  .token-head { grid-template-columns: 40px 1fr auto; grid-template-areas: "icon name phase" "icon bar ptext" "icon created mine" "icon last last"; }
  .trade { padding-left: 12px; }
}
.trade { padding: 4px 12px 12px 58px; display: grid; gap: 8px; }
.trade-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.trade-row .label { width: 1.6em; color: var(--muted); }
.trade-row .unit { color: var(--muted); font-size: 12px; }
button.amount { min-width: 3.6em; }
button.amount.max { font-weight: 700; }

.trade-row input.custom { width: 6.5em; }
.fill, .meta { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.panel-info { margin-top: 6px; font-size: 12px; }
.panel-info summary { cursor: pointer; width: fit-content; }
.panel-info[open] summary { margin-bottom: 4px; }
.panel-info .vault-desc { margin-top: 4px; } .panel-info .vault-desc .vault-text { white-space: pre-line; margin: 4px 0; } /* 金库说明 (a plain 总台 token with a vault) */

/* Preview modal: opens on the click, so nothing has to be scrolled to. */
.modal { position: fixed; inset: 0; z-index: 15; background: rgba(4, 7, 11, .72); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; }
.modal[hidden] { display: none; }
.preview { border-color: #6b5a33; width: min(980px, 100%); margin: 0; box-shadow: 0 18px 60px rgba(0,0,0,.6); }
.preview .close { padding: 2px 10px; font-size: 18px; line-height: 1; background: transparent; border-color: transparent; color: var(--muted); }
/* Send / 放弃 at the top right, kept in view while a long wallet list scrolls */
.preview .panel-head { align-items: center; flex-wrap: wrap; position: sticky; top: 0; z-index: 2; background: var(--surface); margin: -14px -14px 10px; padding: 12px 14px 10px; border-radius: 12px 12px 0 0; border-bottom: 1px solid var(--border); }
.preview-summary { font-size: 13px; margin-bottom: 8px; }
.preview-common p { margin: 4px 0; font-size: 13px; }
.warning, .warn { color: var(--gold); }
.info { color: var(--blue); }
.preview-rows { display: grid; gap: 6px; margin: 8px 0; }
.prow { display: grid; grid-template-columns: minmax(120px, 200px) 1fr auto; gap: 8px 12px; align-items: start; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface2); }
.pname { display: flex; flex-direction: column; }
.pbody { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 13px; }
.kind { font-weight: 600; }
.kind.buy { color: var(--green); } .kind.sell { color: var(--red); } .kind.approve { color: var(--blue); }
.skip { color: var(--muted); }
.good { color: var(--green); }
.error { color: var(--red); }
.pdetails summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.pdetails pre { max-width: 60vw; max-height: 260px; overflow: auto; font-size: 11px; background: #0e141c; padding: 8px; border-radius: 8px; }
.preview-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-left: auto; }

.record-list { display: grid; gap: 4px; font-size: 13px; overflow-y: auto; align-content: start; }
.record { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
/* Colour is the result's kind only: 成交 green, 失败 red, everything else neutral (10-25: no gold, no frames). */
.res { color: var(--muted); font-weight: 600; }
.res.good { color: var(--green); }
.res.bad { color: var(--red); }
.record .why { overflow-wrap: anywhere; }
/* 操作记录: a drawer from the right, scrolling on its own; under the preview modal (15), over the 本次结果 capsules (13). */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 14; width: min(600px, 100vw); border-radius: 0; border-width: 0 0 0 1px; box-shadow: -14px 0 40px rgba(0,0,0,.5); display: flex; flex-direction: column; }
.drawer[hidden] { display: none; }
.drawer .panel-head { align-items: center; flex-wrap: wrap; }
.drawer .panel-head .muted { flex: 1; font-size: 12px; }
.drawer .close { padding: 2px 10px; font-size: 18px; line-height: 1; background: transparent; border-color: transparent; color: var(--muted); }
.drawer .record-list { flex: 1; min-height: 0; }
/* 本次结果 (10-25 晚, as QuickTrade's): capsules at the top centre, the newest on top; under the preview modal (15) and the
   records drawer (14), over everything else. The space between capsules lets clicks through to the top bar. */
.results { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 13; width: min(560px, 92vw); max-height: calc(100vh - 24px); overflow-y: auto; display: grid; gap: 6px; pointer-events: none; font-size: 13px; }
.results > * { pointer-events: auto; }
.results button.small { padding: 1px 8px; font-size: 12px; }
.rflash { margin: 0; justify-self: center; padding: 6px 14px; border-radius: 999px; background: #151c26; border: 1px solid #3b4a5c; box-shadow: 0 8px 28px rgba(0,0,0,.55); }
.rbatch { padding: 7px 12px 8px; border-radius: 16px; background: #151c26; border: 1px solid #3b4a5c; box-shadow: 0 10px 32px rgba(0,0,0,.6); }
.rbatch.fading { animation: rfade .4s ease forwards; }
@keyframes rfade { from { opacity: 1; } to { opacity: 0; transform: translateY(-6px); } }
.rhead { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
/* QuickTrade's pulsing green dot while anything is on its way. */
.rdot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: rpulse 1s ease-in-out infinite; }
@keyframes rpulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(1.45); } }
@media (prefers-reduced-motion: reduce) { .rdot, .rbatch.fading { animation: none; } }
.rhead .rtitle { padding: 0; border: 0; background: transparent; color: var(--text); font-weight: 600; white-space: normal; text-align: left; }
.rhead .rtitle:hover:not(:disabled) { background: transparent; text-decoration: underline; }
.rbatch.done .rtitle { color: var(--green); }
.rcount { color: var(--muted); font-size: 12px; }
.rtools { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.rtools .records-link, .rtools .rfold { color: var(--muted); background: transparent; border-color: transparent; }
.rhead .close { padding: 0 6px; background: transparent; border-color: transparent; color: var(--muted); font-size: 15px; line-height: 1.2; }
.rtiming { margin: 2px 0 0; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.rwhy { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.rrows { list-style: none; margin: 5px 0 0; padding: 5px 0 0; border-top: 1px solid var(--border); display: grid; gap: 3px; max-height: 40vh; overflow-y: auto; }
.rrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.rrow > b { font-weight: 600; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rdetail { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.rolder { margin: 0; justify-self: center; padding: 3px 12px; border-radius: 999px; background: #151c26; border: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.foot { padding: 4px 20px 24px; font-size: 12px; }
.readonly #preview-send { display: none; }

.panel-head button.small { padding: 3px 10px; font-size: 12px; }
.template { width: min(760px, 100%); margin: 0; border-color: #3b4a5c; box-shadow: 0 18px 60px rgba(0,0,0,.6); }
.template textarea { width: 100%; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); background: #0e141c; border: 1px solid #344151; border-radius: 8px; padding: 8px; resize: vertical; }
.template .close { margin-left: auto; padding: 2px 10px; font-size: 18px; line-height: 1; background: transparent; border-color: transparent; color: var(--muted); }
#template-info.error { color: var(--red); }
.search .filter { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.show-only { display: inline-flex; gap: 4px; }
.show-only button.on { border-color: var(--text); color: var(--text); font-weight: 700; }
/* 四米 / Flap: one platform at a time, beside 代币. */
.platform-switch { display: inline-flex; gap: 4px; margin-left: 8px; }
.platform-switch button.on { border-color: var(--text); color: var(--text); font-weight: 700; }

.rounds-status { margin: 0 0 8px; font-size: 12.5px; display: grid; gap: 4px; }
.rounds-status .round-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: #0e141c; }
.rounds-status .warn { color: var(--gold); }

/* The hidden attribute always wins over a display rule (.pair-form, .add-wallet are flex). */
[hidden] { display: none !important; }
/* 本机助手 setup and wallet connections (the page works on its own, without the Agent page) */
.helper-box { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; background: var(--surface2); font-size: 13px; }
.helper-head { display: flex; align-items: center; gap: 8px; }
.helper-head .muted { flex: 1; }
.helper-steps { margin: 8px 0; padding-left: 1.3em; display: grid; gap: 4px; }
.helper-steps code { background: #0e141c; padding: 0 4px; border-radius: 4px; }
.pair-form, .add-wallet { display: flex; gap: 6px; margin: 6px 0; }
.pair-form input, .add-wallet input { flex: 1; min-width: 0; }
.wallet-ops { display: grid; gap: 4px; margin-top: 4px; font-size: 12px; }
.ops-line { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.ops-line button.small, .record button.small { padding: 2px 8px; font-size: 12px; }
.login-box { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 6px 8px; border: 1px dashed var(--gold); border-radius: 8px; color: var(--gold); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* The second click of 手动取消 / 移除 (armed for a few seconds). */
.ops-line button.danger, .record button.danger { color: #ff4d4f; font-weight: 700; }
/* 转出 box beside the wallets: one address for every token. */
.transfer-box { display: grid; gap: 6px; margin: 6px 0 10px; }
.transfer-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; }
.transfer-line > span { color: var(--muted); white-space: nowrap; }
.wallet-out { margin: 4px 0; }
.wallet-to { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.wallet-to.bad { color: #ff4d4f; }
#sweep-held.danger { color: #ff4d4f; font-weight: 700; }
/* 隐藏: a small control on the card; hidden cards shown on demand are dimmed. */
.card-hide { padding: 1px 6px; font-size: 11px; color: var(--muted); background: transparent; border: 1px solid #2a3442; border-radius: 4px; }
.token.is-hidden { opacity: .5; }
.ops-line .auto-out { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.bound-to { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
#slippage.slippage-high { border-color: #ff4d4f; color: #ff4d4f; font-weight: 700; }
.slippage-note { margin-left: 6px; color: #ff4d4f; font-weight: 700; }
.slippage-worst { font-weight: 700; }
/* 练习模式 (server/practice): the banner says so on every page; the 手速 panel floats over the board's bottom-left corner. */
.practice-banner { background: #3a2a10; color: var(--gold); text-align: center; padding: 6px 12px; font-weight: 700; border-bottom: 1px solid #6b5a33; }
.practice-banner a { color: var(--blue); margin-left: 4px; }
.practice-panel { position: fixed; left: 12px; bottom: 12px; z-index: 50; width: 320px; background: var(--surface2); border: 1px solid #6b5a33; border-radius: 8px; padding: 10px; font-size: 13px; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); }
.pp-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pp-status { color: var(--gold); }
.pp-controls { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.pp-stats { margin-bottom: 4px; }
.pp-hint { color: var(--muted); margin-bottom: 4px; }
.pp-countlabel { display: inline-flex; align-items: center; gap: 2px; }
.pp-count-input { width: 48px; }
.pp-list { margin: 0; padding-left: 18px; max-height: 180px; overflow: auto; color: var(--muted); }
.pp-count { position: fixed; inset: 0; display: grid; place-items: center; font-size: 160px; font-weight: 800; color: var(--gold); pointer-events: none; z-index: 60; text-shadow: 0 0 30px rgba(0, 0, 0, .6); }
.pp-count[hidden] { display: none; }

/* Flap rules use the existing drawer and danger colour. */
#sniper-drawer { z-index: 12; } /* Buy results (13) remain visible above the rule editor. */
.sniper-banner { display: flex; gap: 16px; align-items: center; padding: 8px 20px; color: #ff4d4f; border-bottom: 1px solid var(--border); }
.sniper-banner[hidden] { display: none; }
.sniper-body { min-height: 0; overflow-y: auto; padding: 16px; }
.sniper-body .danger { color: #ff4d4f; }
.sniper-bark { padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.sniper-row { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.sniper-row > b { flex: 1; }
.sniper-rule, .sniper-hit { padding: 12px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.sniper-rule p, .sniper-hit p { margin: 6px 0; font-size: 13px; }
#sniper-editor { margin: 18px 0; padding-top: 8px; border-top: 1px solid var(--border); }
#sniper-editor fieldset { border: 1px solid var(--border); border-radius: 6px; margin: 12px 0; padding: 10px; min-width: 0; }
.sniper-field { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; font-size: 13px; }
.sniper-field input, .sniper-field textarea, .sniper-field select { width: 100%; min-width: 0; }
.sniper-choices { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; }
.sniper-wallets { flex-direction: column; flex-wrap: nowrap; max-height: 150px; overflow-y: auto; }
.sniper-row[hidden], #sniper-fixed-amount[hidden] { display: none; }
.sniper-filter { display: flex; align-items: baseline; gap: 16px; margin: 14px 0; font-size: 13px; }
.sniper-filter > span { min-width: 42px; }
#sniper-trial { font-size: 13px; overflow-wrap: anywhere; }
/* gang 打新 (platform-gang-fair.mjs): a sale's facts line under its header; its panel's rows by phase. */
.token.fair .token-head { grid-template-areas: "icon name bar ptext phase" "icon created created last mine" "icon facts facts facts facts"; }
@media (max-width: 1180px) { .token.fair .token-head { grid-template-areas: "icon name phase" "icon bar ptext" "icon created mine" "icon last last" "icon facts facts"; } }
.fair-facts { grid-area: facts; font-size: 12px; color: var(--muted); white-space: normal; }
.fair-trade .trade-row[hidden] { display: none; }
.preview-common .fair-out { font-weight: 600; }
/* Flap 预售 (platform-flap-presale.mjs): the 打新 layout; its facts line and, while the launcher is paused, a yellow line. */
.presale-facts .presale-line { display: block; }
.presale-facts .presale-tax { display: block; }
.presale-facts .presale-warn { display: block; color: var(--gold); font-weight: 600; white-space: pre-line; }
.presale-facts .presale-warn[hidden] { display: none; }
.preview-common .presale-paused { font-weight: 600; }
/* 总台新玩法 (platform-flap-apps.mjs): the same layout; its facts line, the floors line and the yellow lines. */
.apps-facts .apps-line, .apps-facts .apps-floor { display: block; }
.apps-facts .apps-warn { display: block; color: var(--gold); font-weight: 600; white-space: pre-line; }
.apps-facts .apps-warn[hidden], .apps-facts .apps-floor[hidden] { display: none; }
/* Flap 预售 (review 11-04): the sale's hints in the preview and in 本次结果 (it cannot launch now; the launcher paused). */
.preview-common .presale-hint { font-weight: 600; }
.rwhy.rhint, .rdetail .rnote { color: var(--gold); }
.apps-facts .apps-self, .apps-facts .apps-fsi { display: block; }
.apps-facts .apps-self[hidden], .apps-facts .apps-fsi[hidden] { display: none; }
.apps-facts .apps-floor.low { color: var(--red, #d33); }
/* 普通钱包 (docs/TASK_own_wallets.md): its tag first on the wallet, its line and its forms under the helper box. */
.flag.normal-tag { color: var(--text); font-weight: 600; }
.normal-state { margin: 0 0 8px; font-size: 13px; }
.normal-state.warn { color: var(--gold); }
.normal-state .own-actions { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 6px; vertical-align: middle; }
.normal-state .own-actions button.on { border-color: var(--text); }
.normal-state .own-unbacked, .normal-state .own-archived, .normal-state .own-not-kept { color: var(--gold); }
.own-panel { margin: 0 0 10px; padding: 8px; border: 1px solid var(--line, #444); border-radius: 6px; background: var(--panel, transparent); }
.own-form { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; }
.own-form .own-form-title { flex-basis: 100%; }
.own-form textarea { width: 100%; min-height: 5em; font-family: ui-monospace, monospace; font-size: 12px; box-sizing: border-box; }
.own-form .own-field:has(textarea) { flex-basis: 100%; }
.own-form .own-hint { flex-basis: 100%; margin: 0; font-size: 12px; }
.own-rename { display: inline-flex; gap: 4px; }
.own-rename input { width: 12em; }
li.wallet.own-code b { color: var(--red, #d33); }
/* 冲刺 (sprint.mjs): one button under 买, a line for why it did not go, the wallets it used. */
.sprint-box { margin: 2px 0 4px; }
.sprint-row .sprint-go { font-weight: 700; }
.sprint-say { margin-left: 8px; font-size: 12px; color: var(--gold); }
.sprint-fund { font-size: 12px; }
.sprint-fund button.link, .template-sprint button.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.sprint-used { font-size: 12px; margin: 2px 0 0 2.4em; }
.sprint-used button.link, .normal-state button.link, .own-panel button.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.sprint-used-list { margin: 4px 0 0; padding-left: 1.2em; font-family: ui-monospace, monospace; font-size: 11px; }
.sprint-form { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 4px 0 4px 2.4em; font-size: 12px; }
.fund-tag { font-weight: 600; color: var(--text); margin-left: 4px; }
.rfoot { margin-top: 4px; }
