:root {
  color-scheme: dark;
  font-family: Inter, "Microsoft YaHei UI", system-ui, sans-serif;
  --page: #101417;
  --panel: #171d21;
  --field: #11171b;
  --line: #2b353d;
  --ink: #ecf1f0;
  --muted: #a4b3ba;
  --accent: #a6edc0;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); color: var(--ink); }
.top {
  min-height: 68px; padding: 16px max(24px, calc((100vw - 1240px) / 2));
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 6px; }
.mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  color: var(--accent); background: #213c30; font-size: 23px; line-height: 1;
}
.connection, .pill { border: 1px solid var(--line); border-radius: 24px; padding: 5px 11px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.connection[data-active="true"], .pill[data-active="true"] { color: var(--accent); border-color: #37664b; background: #1a3025; }
main { max-width: 1288px; margin: 0 auto; padding: 37px 24px 64px; }
h1 { margin: 0; font-size: clamp(30px, 5vw, 42px); letter-spacing: -.045em; }
.intro p { color: var(--muted); margin: 11px 0 30px; font-size: 14px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; align-items: start; }
.overview { display: grid; gap: 18px; min-width: 0; }
.card { min-width: 0; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
h2 { margin: 0 0 19px; font-size: 19px; letter-spacing: -.018em; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-head h2 { margin: 0; }
.stack { display: block; font-size: 13px; font-weight: 600; }
input:not([type="checkbox"]), select {
  width: 100%; min-height: 40px; background: var(--field); border: 1px solid var(--line);
  border-radius: 7px; padding: 8px 10px; color: var(--ink); font: inherit; font-size: 13px;
}
.stack > input, .stack > select, .search-line { margin-top: 6px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 14px 0; }
.search-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.mono { font-family: "Cascadia Mono", Consolas, monospace; }
button { font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; border-radius: 7px; padding: 9px 13px; min-height: 38px; border: 1px solid transparent; background: var(--accent); color: #102319; }
button.secondary { color: var(--ink); border-color: var(--line); background: var(--field); }
button.link-button { background: transparent; color: var(--accent); }
button:hover:not(:disabled) { filter: brightness(1.12); }
button:disabled { opacity: .44; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.note { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 7px 0 0; }
.search-result { margin: 11px 0; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.search-result p { margin: 6px 0; }
.search-result details { margin-top: 7px; color: var(--muted); }
.search-result summary { cursor: pointer; }
.trade-pair { margin-top: 14px; }
#pair-address { overflow-wrap: anywhere; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 18px 0 0; padding: 9px 11px 11px; min-width: 0; }
legend { padding: 0 5px; font-size: 13px; }
#wallet-count { color: var(--muted); margin-left: 4px; }
.wallets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(105px, 100%), 1fr)); gap: 7px; }
.check { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.wallets .check { padding: 6px; border-radius: 5px; background: var(--field); }
input[type="checkbox"] { accent-color: var(--accent); margin: 1px; }
#live-confirm { margin: 14px 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.message { color: #ffcf9d; font-size: 13px; overflow-wrap: anywhere; }
.next { display: flex; flex-direction: column; margin: 20px 0 16px; gap: 6px; }
.next span, dt { color: var(--muted); font-size: 12px; }
.next strong { color: var(--accent); font-size: clamp(24px, 5vw, 33px); }
.metrics { display: grid; grid-template-columns: .8fr 1fr 1.25fr; margin: 0; gap: 10px; }
.metrics > div { border-top: 1px solid var(--line); min-width: 0; padding-top: 10px; }
dd { margin: 6px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.table-wrap { max-height: 430px; overflow: auto; margin-top: 13px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; overflow-wrap: anywhere; }
th, td { padding: 10px 7px; vertical-align: top; border-bottom: 1px solid var(--line); }
th { position: sticky; top: 0; background: var(--panel); color: var(--muted); }
td:nth-child(1), td:nth-child(2) { white-space: nowrap; }
a { color: var(--accent); }
@media (max-width: 830px) { .layout { grid-template-columns: 1fr; } }
@media (max-width: 460px) {
  main { padding: 26px 12px 44px; }
  .top { padding-inline: 12px; }
  .card { padding: 15px; }
}
.login-card { max-width: 430px; margin: clamp(18px, 8vh, 90px) auto 0; }
.login-card h1 { font-size: 28px; }
.login-card form { margin-top: 20px; }
.login-card button { margin-top: 14px; }
