:root {
    color-scheme: light;
    font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: #202635;
    background: #f6f8fb;
    --blue: #145ddd;
    --muted: #586579;
    --line: #dce2eb;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
input, button { font: inherit; }
a { color: #124eaf; text-underline-offset: .18em; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #91b8ff; outline-offset: 2px; }
button, .button {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 38px; padding: 7px 15px; border: 1px solid #cbd4e1; border-radius: 7px;
    color: #29384e; background: #fff; cursor: pointer; text-decoration: none; font-weight: 600;
}
button:hover, .button:hover { border-color: #aab9ce; background: #f6f8fc; }
.primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.primary:hover { color: #fff; background: #0b4fbf; border-color: #0b4fbf; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 3vw, 2.05rem); line-height: 1.25; font-weight: 700; }
h2 { font-size: 1.18rem; }
h2 strong { color: var(--blue); overflow-wrap: anywhere; }
label { display: grid; gap: 5px; font-weight: 600; min-width: 0; }
input:not([type=hidden]) {
    display: block; width: 100%; min-width: 0; padding: 8px 10px;
    min-height: 40px; border: 1px solid #bac5d4; border-radius: 6px; color: #202635; background: #fff;
}
input::placeholder { color: #6d7787; font-weight: 400; }
.stack { display: grid; gap: 14px; }
.stack > button { justify-self: start; }
.entry { min-height: 100vh; display: grid; place-items: center; padding: 24px 14px; }
.entry-card, .card { background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.entry-card {
    width: min(100%, 420px); padding: clamp(22px, 5vw, 36px); display: grid; gap: 24px;
    box-shadow: 0 12px 36px #1627450b;
}
.entry-card.wide { width: min(100%, 480px); gap: 18px; }
.entry-card button { width: 100%; }
.entry .stack { gap: 16px; }
.brand { color: #24334b; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; }
.brand-mark { display: inline-block; position: relative; width: 28px; height: 28px; border-radius: 7px; background: var(--blue); }
.brand-mark::before, .brand-mark::after { position: absolute; content: ""; bottom: 6px; width: 4px; border-radius: 2px; background: #fff; }
.brand-mark::before { height: 10px; left: 8px; }
.brand-mark::after { height: 16px; left: 16px; }
.top { background: white; border-bottom: 1px solid var(--line); }
.shell { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.bar, .page-head, .section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.bar { min-height: 62px; padding-block: 10px; }
.bar-actions, .account-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.bar-actions > span { color: var(--muted); overflow-wrap: anywhere; }
.dashboard { padding-block: 32px 56px; display: grid; gap: 20px; }
.card { padding: clamp(16px, 2.1vw, 24px); min-width: 0; }
.card > h2, .section-head { margin-bottom: 18px; }
.list { padding: 0; }
.empty { padding: 24px; color: var(--muted); }
.hint, .subtle { color: var(--muted); }
.hint { font-size: .86rem; }
.stack .hint { margin-top: -8px; }
.alert { padding: 11px 14px; background: #eef5ff; color: #164b87; border-radius: 7px; overflow-wrap: anywhere; }
.alert.error { background: #fff1ed; color: #922c15; }
.scroll-table { width: 100%; overflow-x: auto; border-radius: inherit; }
table { border-collapse: collapse; width: 100%; white-space: nowrap; text-align: left; }
th, td { padding: 11px 16px; border-bottom: 1px solid var(--line); }
thead th { background: #f9fafc; font-size: .88rem; color: var(--muted); }
tbody tr:last-child > * { border: 0; }
tbody th { font-weight: 600; }
.state { color: #785033; }
.state.on { color: #19623d; }
.settings-grid, .edit-grid, .pair { display: grid; gap: 16px; }
.settings-grid { grid-template-columns: 1.2fr 1fr; align-items: start; }
.edit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pair { grid-template-columns: minmax(0, 1.7fr) minmax(80px, 1fr); }
.account-actions { padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); }
.account-actions + .hint { margin-top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 760px) {
    .settings-grid, .edit-grid { grid-template-columns: minmax(0, 1fr); }
    .shell { width: calc(100% - 28px); }
    .dashboard { padding-top: 22px; }
}
@media (max-width: 460px) {
    .pair { grid-template-columns: minmax(0, 1fr); }
    th, td { padding-inline: 12px; }
}
