.mx-console {
    --mc-ink: #141920;
    --mc-muted: #525d6b;
    --mc-line: #d6dce2;
    --mc-blue: #2452ee;
    --mc-mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
    color: var(--mc-ink);
    background: #fafbf8;
    min-height: 70vh;
    font-family: "Geist", "Microsoft YaHei", "PingFang SC", sans-serif;
    text-align: left;
}

.mx-console *, .mx-console *::before, .mx-console *::after { box-sizing: border-box; }
.mx-console [hidden] { display: none !important; }
.mc-container { max-width: 1240px; padding: clamp(40px, 7vw, 80px) clamp(18px, 5vw, 56px); margin: auto; }
.mc-heading, .mc-history-heading, .mc-session { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.mc-heading { margin-bottom: clamp(25px, 4vw, 40px); }
.mc-heading h1 { margin: 0; font-size: clamp(34px, 4.6vw, 60px); line-height: 1.18; letter-spacing: -.055em; font-weight: 720; }
.mc-heading p, .mc-history-heading p, .mc-auth p { font-size: 14px; line-height: 1.65; margin: 10px 0 0; color: var(--mc-muted); }
.mc-connection { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--mc-muted); font-size: 13px; }
.mc-connection::before { content: ""; width: 8px; height: 8px; border: 1px solid currentColor; border-radius: 50%; }
.mc-connection.is-connected { color: #186844; }
.mc-connection.is-connected::before { background: currentColor; }
.mc-auth { border: 1px solid var(--mc-line); border-left: 3px solid var(--mc-blue); background: #fff; border-radius: 7px; padding: clamp(18px, 3vw, 28px); }
.mc-auth label, .mc-session strong { display: block; font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.mc-input-row { display: flex; gap: 10px; margin-top: 12px; }
.mc-input-row input { font: 15px var(--mc-mono); color: var(--mc-ink); background: #fafbfc; border: 1px solid #b4beca; border-radius: 6px; padding: 0 14px; min-height: 46px; flex: 1; min-width: 0; }
.mc-button { display: inline-flex; justify-content: center; align-items: center; font: inherit; font-size: 14px; font-weight: 600; border: 1px solid transparent; border-radius: 6px; padding: 10px 19px; cursor: pointer; min-height: 44px; line-height: 1.25; }
.mc-primary { color: #fff; background: var(--mc-blue); }
.mc-primary:hover { background: #183fc7; }
.mc-plain { color: var(--mc-ink); background: #fff; border-color: #bec7d0; }
.mc-plain:hover { border-color: var(--mc-blue); color: var(--mc-blue); }
.mc-button:disabled { cursor: wait; opacity: .65; }
.mx-console :is(input, button):focus-visible { outline: 3px solid #597afb; outline-offset: 3px; }
.mc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mc-auth .mc-error { color: #a12c30; }
.mc-balances { margin-block: clamp(24px, 4vw, 42px); }
.mc-wallet { display: grid; grid-template-columns: 1.15fr 1fr 1fr; margin: 0; padding: 1px; background: var(--mc-line); gap: 1px; border-radius: 8px; overflow: hidden; }
.mc-wallet > div { min-width: 0; padding: clamp(18px, 3vw, 30px); background: #fff; }
.mc-wallet > div:first-child { background: #eef2ff; }
.mc-wallet dt { font-size: 14px; font-weight: 550; color: var(--mc-muted); }
.mc-wallet dt small, .mc-history th small { font: 11px var(--mc-mono); margin-left: 4px; }
.mc-wallet dd { font: 500 clamp(22px, 2.6vw, 33px)/1.2 var(--mc-mono); margin: 17px 0 0; font-variant-numeric: tabular-nums; letter-spacing: -.065em; overflow-wrap: anywhere; }
.mc-wallet > div:first-child dd { color: #2048cd; }
.mc-history { border: 1px solid var(--mc-line); background: #fff; border-radius: 8px; overflow: hidden; }
.mc-history-heading { padding: 23px clamp(18px, 3vw, 30px); border-bottom: 1px solid var(--mc-line); }
.mc-history-heading h2 { margin: 0; font-size: 23px; line-height: 1.3; letter-spacing: -.04em; }
.mc-history-heading p { margin-top: 5px; }
#mc-count { color: var(--mc-muted); font-size: 13px; }
.mc-table-wrap { overflow: auto; }
.mc-history table { width: 100%; border-spacing: 0; text-align: left; font-size: 13px; }
.mc-history :is(th, td) { padding: 14px 12px; vertical-align: middle; }
.mc-history :is(th, td):first-child { padding-left: clamp(18px, 3vw, 30px); }
.mc-history th { color: var(--mc-muted); background: #f2f4f5; font-weight: 600; white-space: nowrap; }
.mc-history tbody tr + tr td { border-top: 1px solid #e6e9ed; }
.mc-history td { font-family: var(--mc-mono); overflow-wrap: anywhere; }
.mc-history td:first-child { width: 32%; }
.mc-history td small { display: block; margin-top: 4px; font: 12px/1.4 var(--mc-mono); color: var(--mc-muted); }
.mc-history td[data-label="状态"] { white-space: nowrap; font-family: inherit; }
.mc-history td[data-status="settled"] { color: #186844; }
.mc-history :is(td[data-status="pending"], td[data-status="reserved"]) { color: #855405; }
.mc-empty { margin: 0; padding: clamp(36px, 6vw, 72px) 16px; text-align: center; font-size: 14px; color: var(--mc-muted); }
.mc-more { margin: 16px clamp(18px, 3vw, 30px); }
.mc-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 720px) {
    .mc-wallet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mc-wallet > div:first-child { grid-column: 1 / -1; }
    .mc-wallet dd { margin-top: 10px; }
    .mc-session { align-items: flex-start; flex-direction: column; }
    .mc-history table, .mc-history tbody { display: block; }
    .mc-history thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
    .mc-history tr { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 18px; }
    .mc-history tbody tr + tr { border-top: 1px solid var(--mc-line); }
    .mc-history td, .mc-history tbody tr + tr td, .mc-history td:first-child { display: block; border: 0; padding: 0; width: auto; }
    .mc-history td::before { display: block; content: attr(data-label); color: var(--mc-muted); font: 12px/1.5 "Microsoft YaHei", sans-serif; margin-bottom: 3px; }
    .mc-history td:first-child { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
    .mc-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
    .mc-input-row { flex-direction: column; }
}
