* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: var(--fs-base)/var(--lh-base) var(--font-sans); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
.pad { padding: 24px; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: var(--fs-sm); letter-spacing: -.01em; }
a { color: var(--accent); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
h1 { font-size: var(--fs-xl); line-height: var(--lh-tight); letter-spacing: -.01em; }
h2 { font-size: var(--fs-md); line-height: var(--lh-tight); }
h3 { font-size: var(--fs-base); margin: 24px 0 8px; }
.skip { position: absolute; left: 8px; top: -40px; background: var(--card); padding: 6px 10px; border-radius: var(--radius); z-index: 100; }
.skip:focus { top: 8px; }

.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.top-in { max-width: 1440px; margin: 0 auto; height: 56px; padding: 0 28px; display: flex; align-items: center; gap: 12px; }
.bar-btn { background: none; border: 1px solid transparent; border-radius: var(--radius); padding: 6px 8px; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text); cursor: pointer; }
.bar-btn:hover { background: var(--hover); border-color: transparent; }
.bar-btn.on { color: var(--accent); }
.switch b { font-weight: 600; font-size: var(--fs-md); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mark { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); flex: none; }
.chev { width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); margin-left: 2px; }
.mode { font-size: var(--fs-xs); font-weight: 600; color: var(--ok); background: var(--ok-bg); border-radius: var(--radius-sm); padding: 1px 7px; }
.mode.test { color: var(--warn); background: var(--warn-bg); }
.search { position: relative; margin-left: auto; width: min(380px, 40vw); }
.search-input { width: 100%; height: 34px; padding: 0 64px 0 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); }
.search-input:hover { border-color: var(--line-strong); }
.search kbd { position: absolute; right: 8px; top: 7px; font: var(--fs-xs)/18px var(--font-sans); color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 5px; background: var(--card); pointer-events: none; }
.search-results { position: absolute; left: 0; right: 0; top: 40px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-2); padding: 4px; max-height: 60vh; overflow: auto; }
.search-results a { display: flex; flex-direction: column; padding: 7px 10px; border-radius: var(--radius); color: var(--text); }
.search-results a:hover, .search-results a:focus { background: var(--hover); text-decoration: none; }
.search-results small { color: var(--muted); }
.search-results p { margin: 8px 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--code); color: var(--muted); display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 600; }
.acct { padding: 2px; }
.menu-wrap { position: relative; }
.pop { position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-2); padding: 4px; z-index: 40; }
.acct + .pop, .menu-wrap:last-child .pop { left: auto; right: 0; }
.pop a, .pop button { display: flex; justify-content: space-between; gap: 16px; width: 100%; padding: 7px 10px; border: 0; border-radius: var(--radius); background: none; color: var(--text); font-weight: 400; text-align: left; cursor: pointer; }
.pop a:hover, .pop button:hover, .pop a:focus, .pop button:focus { background: var(--hover); text-decoration: none; }
.pop a.on { font-weight: 600; }
.pop small { color: var(--muted); }
.pop-head { padding: 6px 10px 4px; font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.pop-sep { height: 1px; background: var(--line); margin: 4px 0; }

.tabrow { background: var(--card); border-bottom: 1px solid var(--line); }
.tabs, .subtabs { max-width: 1440px; margin: 0 auto; padding: 0 20px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .subtabs a { color: var(--muted); padding: 10px 10px 11px; white-space: nowrap; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: 6px; }
.tabs a:hover, .subtabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--text); border-bottom-color: var(--text); font-weight: 500; }
.subtabs { border-top: 1px solid var(--line); }
.subtabs a { padding: 7px 10px 8px; font-size: var(--fs-sm); }
.subtabs a.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 500; }
.count { background: var(--bad); color: var(--on-bad); border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: 600; min-width: 18px; padding: 0 6px; line-height: 18px; text-align: center; }

main { max-width: 1440px; margin: 0 auto; padding: 28px 28px 80px; outline: none; }
.page { min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.banners:empty { display: none; }
.sub { color: var(--muted); margin: 0 0 16px; }

.sec { margin: 0 0 32px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.sec-head h2 { font-size: var(--fs-md); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; margin: 0 0 16px; }
.card > h3:first-child, .card > h4:first-child { margin-top: 0; }
.ruled { border-top: 1px solid var(--line); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); }
.table-wrap:focus { outline: none; }
.table-wrap:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.table-wrap.plain { border: 0; border-radius: 0; background: none; }
.flow td:first-child { white-space: normal; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
th, td { text-align: left; padding: 0 12px; height: 40px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
td.wrap, th.wrap, td.two { white-space: normal; }
td.nowrap { white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 500; font-size: var(--fs-sm); height: 34px; background: var(--rail); }
.plain th { background: none; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.amt { text-align: right; font-weight: 600; }
td.amt small, td.num small { color: var(--muted); font-weight: 400; font-size: var(--fs-xs); margin-left: 4px; }
td.trunc { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
td .sub2 { display: block; color: var(--muted); font-size: var(--fs-sm); line-height: 1.3; }
td.two { padding-top: 7px; padding-bottom: 7px; height: auto; }
td.mono { color: var(--muted); }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--hover); }
tr.click:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
tr.sel td { background: var(--accent-soft); }
tr.sel td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
tr.group td { background: var(--rail); font-weight: 600; height: 36px; }
tr.group td .muted { font-weight: 400; margin-left: 6px; }
.tone { display: inline-block; width: 3px; height: 14px; border-radius: 2px; vertical-align: -2px; margin-right: 10px; background: var(--faint); }
.tone.bad { background: var(--bad); }
.tone.warn { background: var(--warn); }
.tone.ok { background: var(--ok); }
td.cb, th.cb { width: 36px; padding-right: 0; }

.pill { display: inline-flex; align-items: center; padding: 0 7px; line-height: 20px; border-radius: var(--radius-sm); font-size: var(--fs-xs); font-weight: 600; color: var(--muted); background: var(--code); white-space: nowrap; }
.pill.ok, .pill.paid, .pill.completed, .pill.delivered, .pill.confirmed { color: var(--ok); background: var(--ok-bg); }
.pill.warn, .pill.pending, .pill.partially_refunded, .pill.requested, .pill.waiting, .pill.retrying { color: var(--warn); background: var(--warn-bg); }
.pill.failed, .pill.disputed, .pill.refund_failed, .pill.bad { color: var(--bad); background: var(--bad-bg); }
.pill.info, .pill.processing, .pill.refunded, .pill.approved, .pill.sending { color: var(--info); background: var(--info-bg); }
.pill:not(:last-child) { margin-right: 6px; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money.in { color: var(--ok); }
.money.out { color: var(--bad); }
.big-money { font-weight: 300; letter-spacing: -.02em; line-height: 1.05; white-space: nowrap; }
.big-money small { font-size: .55em; color: var(--muted); letter-spacing: 0; }
.up { color: var(--ok); font-weight: 500; }
.down { color: var(--bad); font-weight: 500; }

button, input, select, textarea { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 7px 11px; }
input:hover, select:hover, textarea:hover { border-color: var(--text); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
textarea { width: 100%; min-height: 80px; }
button { cursor: pointer; font-weight: 500; border-color: var(--line); transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
button:hover:not(:disabled) { background: var(--hover); border-color: var(--line-strong); }
button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
button.primary:hover:not(:disabled) { background: var(--accent); filter: brightness(1.12); }
button.danger { color: var(--bad); border-color: var(--line); }
button.danger:hover:not(:disabled) { background: var(--bad-bg); border-color: var(--bad); }
button.link { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 500; }
button.link:hover:not(:disabled) { background: none; text-decoration: underline; text-underline-offset: 3px; }
td .link, td a { margin-left: 10px; }
td .link:first-child, td a:first-child { margin-left: 0; }
button.small { padding: 3px 9px; font-size: var(--fs-sm); }
button:disabled { opacity: .5; cursor: not-allowed; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; padding: 0; vertical-align: middle; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.row > input, .row > select { flex: 1; min-width: 140px; }
.field { margin: 10px 0; }
.field label { display: block; font-size: var(--fs-sm); font-weight: 500; margin-bottom: 4px; }
.field input, .field select { width: 100%; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; align-items: start; }
.form > :not(.field) { grid-column: 1 / -1; }
.form .field:has(textarea) { grid-column: 1 / -1; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.err { color: var(--bad); margin: 8px 0; }
.ok-msg { color: var(--ok); margin: 8px 0; }
.secret { background: var(--warn-bg); border: 1px dashed var(--warn); border-radius: var(--radius); padding: 12px 14px; margin: 10px 0; word-break: break-all; }
.secret b { display: block; margin-bottom: 4px; color: var(--warn); }
details summary { cursor: pointer; color: var(--muted); }
pre { background: var(--code); padding: 12px 14px; border-radius: var(--radius); overflow: auto; font: 12.5px/1.6 var(--font-mono); margin: 6px 0; color: var(--text); }
dl.kv { margin: 0; }
dl.kv > div { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
dl.kv > div:last-child { border-bottom: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.chips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line); background: var(--card); border-radius: var(--radius-pill); padding: 3px 11px; font-size: var(--fs-sm); color: var(--muted); }
.chips button.on { background: var(--text); border-color: var(--text); color: var(--card); }
.chips .n { margin-left: 6px; opacity: .7; }
.filterbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 12px; }
.filterbar input[type=search] { flex: 1 1 260px; max-width: 340px; }
.filterbar select, .filterbar input[type=date] { padding: 6px 10px; }
.filterbar .total { margin-left: auto; color: var(--muted); font-size: var(--fs-sm); }
.views { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 12px; overflow-x: auto; scrollbar-width: none; }
.views button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 7px 12px 9px; color: var(--muted); white-space: nowrap; margin-bottom: -1px; }
.views button:hover:not(:disabled) { background: none; color: var(--text); }
.views button.on { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.views .n { color: var(--muted); font-weight: 400; margin-left: 5px; }
.more { display: flex; justify-content: center; padding: 14px 0; }
.empty { text-align: center; padding: 28px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--card); }
.empty b { display: block; font-size: var(--fs-md); margin-bottom: 4px; }
.quiet { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); color: var(--muted); }
.quiet .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }

.home { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.rail { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 28px; padding-top: 2px; }
.rail h2 { margin-bottom: 6px; }
.rail .hint { color: var(--muted); font-size: var(--fs-sm); margin: 0 0 8px; }
.funds .big-money { font-size: 34px; display: block; margin: 2px 0 6px; }
.funds .line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.funds .line span:first-child { color: var(--muted); }
.wallets { margin-top: 8px; }
.wallets .w { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 2px 10px; padding: 7px 0; border-top: 1px solid var(--line); align-items: baseline; }
.wallets .w i { width: 10px; height: 10px; border-radius: 2px; align-self: center; }
.wallets .w b { font-weight: 500; }
.wallets .w small { grid-column: 2 / -1; color: var(--muted); font-size: var(--fs-xs); }
.figs > div { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.figs dt { color: var(--muted); }
.figs dd { margin: 0; font-weight: 600; text-align: right; }
.figs dd .prev { display: block; font-weight: 400; font-size: var(--fs-xs); color: var(--muted); }
.figs dd .prev span { margin-left: 6px; }
.health { list-style: none; margin: 0; padding: 0; }
.health li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 0 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.health i { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--ok); }
.health i.warn { background: var(--warn); }
.health i.bad { background: var(--bad); }
.health i.off { background: var(--faint); }
.health small { grid-column: 2; color: var(--muted); font-size: var(--fs-xs); }
.queue td.why { white-space: normal; min-width: 220px; color: var(--text); }
.queue td.due { color: var(--muted); }
.queue td.due.soon { color: var(--bad); font-weight: 600; }
.queue .bulkbar { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--rail); font-size: var(--fs-sm); color: var(--muted); }
.queue .bulkbar .sp { flex: 1; }
.queue .fold td { color: var(--muted); white-space: normal; }
.queue .fold a, td.why a, p a, .hint a { text-decoration: underline; text-underline-offset: 3px; }
.today { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.today-sec { margin-top: 36px; }
.today-sec h2 { margin-bottom: 6px; }
.today .big-money { font-size: 32px; font-weight: 400; }
.chart { margin: 12px 0 0; }
.chart-svg { display: block; width: 100%; height: 150px; overflow: visible; }
.chart-today { fill: none; stroke: var(--series-a); stroke-width: 2; }
.chart-week { fill: none; stroke: var(--series-b); stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart-now { stroke: var(--line); }
.chart-dot { fill: var(--series-a); }
.chart-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: var(--fs-xs); margin-top: 6px; }
.legend { display: flex; gap: 18px; font-size: var(--fs-xs); color: var(--muted); margin-top: 8px; }
.legend span::before { content: ""; display: inline-block; width: 14px; border-top: 2px solid var(--series-a); vertical-align: middle; margin-right: 6px; }
.legend span.prev::before { border-top: 2px dashed var(--series-b); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 70px 14px minmax(0, 1fr) auto; gap: 1px 10px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.feed li.click:hover { background: var(--hover); }
.feed time { color: var(--muted); font-size: var(--fs-sm); }
.feed .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); align-self: center; }
.feed .dot.ok { background: var(--ok); }
.feed .dot.warn { background: var(--warn); }
.feed .dot.bad { background: var(--bad); }
.feed b { font-weight: 500; }
.feed .what { grid-column: 3 / -1; color: var(--muted); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .meth { color: var(--muted); font-size: var(--fs-sm); grid-row: 1; grid-column: 4; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); overflow: hidden; }
.split .table-wrap { border: 0; border-radius: 0; }
.panel { border-left: 1px solid var(--line); padding: 18px 22px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: var(--fs-sm); }
.panel .big-money { font-size: 30px; font-weight: 400; display: inline-block; margin: 8px 10px 2px 0; }
.steps { list-style: none; margin: 14px 0 0; padding: 0; }
.steps li { position: relative; padding: 0 0 14px 22px; }
.steps li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.steps li::after { content: ""; position: absolute; left: 6.5px; top: 17px; bottom: -1px; width: 1px; background: var(--line-strong); }
.steps li:last-child::after { display: none; }
.steps li.grey::before { background: var(--faint); }
.steps li.warn::before { background: var(--warn); }
.steps li.bad::before { background: var(--bad); }
.steps small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.mob-list { display: none; }
.queue-mob { display: none; }

.detail { display: grid; grid-template-columns: 170px minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.toc { position: sticky; top: 104px; font-size: var(--fs-sm); }
.toc a { display: block; padding: 4px 10px; border-left: 2px solid var(--line); color: var(--muted); }
.toc a:hover { color: var(--text); text-decoration: none; border-left-color: var(--line-strong); }
.dhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dhead .sp { flex: 1; }
.dhead .big-money { font-size: 40px; font-weight: 300; }
.crumb { color: var(--muted); margin-bottom: 8px; display: inline-block; }
.dsub { color: var(--muted); margin: 4px 0 18px; }
.flow { margin: 0 0 32px; }
.flow table td { height: 38px; }
.flow tr.total td { border-top: 1px solid var(--text); font-weight: 600; }
.side-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); padding: 14px 18px; position: sticky; top: 104px; }
.side-card h2 { margin: 6px 0 4px; }
.side-card dl.kv > div { grid-template-columns: 110px minmax(0, 1fr); }
.notes p { margin: 6px 0; }

.balance-hero { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 48px; margin: 0 0 40px; align-items: start; }
.balance-hero h1 { font-size: var(--fs-md); font-weight: 500; color: var(--muted); }
.balance-hero .big-money { font-size: var(--fs-display); display: block; margin: 4px 0 8px; }
.balmeta { display: flex; gap: 24px; color: var(--muted); flex-wrap: wrap; }
.balmeta b { color: var(--text); font-weight: 500; }
.comp { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; margin: 24px 0 0; background: var(--code); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 10px; vertical-align: 0; }
.w1 { background: var(--wallet-1); } .w2 { background: var(--wallet-2); } .w3 { background: var(--wallet-3); } .w4 { background: var(--wallet-4); } .w5 { background: var(--wallet-5); }
.balance-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.payout-next { border-left: 2px solid var(--accent); padding: 2px 0 2px 16px; margin: 6px 0 24px; }
.payout-next .big-money { font-size: var(--fs-figure); }
.payout-next p { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.rules { list-style: none; margin: 6px 0 0; padding: 0; font-size: var(--fs-sm); }
.balance-grid aside h2 { margin: 26px 0 6px; }
.balance-grid aside h2:first-child { margin-top: 0; }
a.btn { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 14px; font-weight: 500; color: var(--text); background: var(--card); }
a.btn:hover { text-decoration: none; background: var(--hover); }
a.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.balance-hero .actions { margin-top: 18px; }
.rules li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); color: var(--muted); }
.rules li b { font-weight: 400; color: var(--text); }

.auth { max-width: 400px; margin: 12vh auto; padding: 0 16px; }
.auth h1 { font-size: var(--fs-xl); margin-bottom: 4px; }
.auth .card { margin-top: 16px; }
.auth .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; font-weight: 600; }
.plan-editor { overflow-x: auto; }
.plan-editor input:not([type=checkbox]) { width: 7.5rem; min-width: 0; }
.standing { display: flex; gap: 10px; align-items: center; margin: 4px 0 8px; }
.toolbar-row { justify-content: space-between; margin: 0 0 14px; }
.ranked td:first-child { font-family: var(--font-mono); font-size: var(--fs-sm); }
.ledger { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 0 24px; }
.fig { padding: 12px 24px 12px 0; margin-right: 24px; border-right: 1px solid var(--line); min-width: 0; }
.fig:last-child { border-right: 0; }
.fig-n { font-size: var(--fs-lg); font-weight: 600; }
.fig-l { color: var(--muted); font-size: var(--fs-sm); }
.fig.bad .fig-n { color: var(--bad); }

@media (max-width: 1180px) {
  .detail { grid-template-columns: minmax(0, 1fr) 280px; }
  .toc { display: none; }
  .home { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
}
@media (max-width: 900px) {
  .top-in { padding: 0 14px; height: 52px; gap: 6px; }
  .search { width: auto; flex: 1; min-width: 0; }
  .search kbd { display: none; }
  .search-input { padding-right: 10px; }
  .switch b { max-width: 120px; }
  .mode { display: none; }
  .tabs, .subtabs { padding: 0 6px; }
  main { padding: 18px 14px 56px; }
  .home, .detail, .balance-hero, .balance-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .rail, .side-card { position: static; }
  .split { grid-template-columns: minmax(0, 1fr); border: 0; background: none; }
  .split .panel { display: none; }
  .split > .table-wrap { display: none; }
  .mob-list { display: block; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
  .mob-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
  .mob-list .a { font-weight: 600; text-align: right; }
  .mob-list .d { color: var(--muted); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .feed li { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .feed .dot { display: none; }
  .feed .what { grid-column: 2 / -1; }
  .feed .meth { grid-column: 3; }
  .queue .table-wrap { display: none; }
  .queue-mob { display: block; list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); }
  .queue-mob li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .queue-mob li:last-child { border-bottom: 0; }
  .queue-mob li.g { display: block; background: var(--rail); font-weight: 600; padding: 7px 14px; }
  .queue-mob .a { font-weight: 600; text-align: right; }
  .queue-mob .d { grid-column: 1 / -1; color: var(--muted); font-size: var(--fs-sm); }
  .queue-mob .n { grid-column: 1 / -1; }
  .search { flex: 1 1 120px; }
  .top-in .bar-btn.on, .top-in .menu-wrap:not(:first-child) .bar-btn { padding: 6px; }
  .feed { margin-right: -2px; }
  .form { grid-template-columns: 1fr; }
  dl.kv > div { grid-template-columns: 112px minmax(0, 1fr); }
  .balance-hero .big-money { font-size: 38px; }
  .filterbar input[type=search] { max-width: none; flex-basis: 100%; }
  .filterbar .total { display: none; }
  .page-head { align-items: flex-start; }
  .dhead .big-money { font-size: 34px; }
  th, td { padding: 0 10px; }
}
@media (max-width: 520px) {
  .switch b { max-width: 96px; }
  .hide-s { display: none; }
}
