:root {
  --bg: #14120e;
  --bg-2: #1e1a14;
  --line: #3a3226;
  --text: #f4efe6;
  --muted: #b3a48f;
  --brass: #e2b657;
  --brass-2: #8c6a24;
  --good: #9ddead;
  --bad: #e08b78;
  --ink: #1c1914;
  color-scheme: dark;
  font-family: "Segoe UI", "Noto Sans", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; color: inherit; }
button, .button {
  background: var(--brass);
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
button.ghost, .button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button:disabled { opacity: 0.5; cursor: default; }
h1, h2 { font-weight: 560; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.05rem; margin-bottom: 0.8rem; }
.brand { margin: 0 0 0.2rem; color: var(--brass); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.75rem; }
.muted { color: var(--muted); line-height: 1.45; }
.error { color: var(--bad); min-height: 1.2em; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem; }
.gate { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.gate-card { width: min(420px, 100%); display: grid; gap: 0.8rem; }
header, .layout, .stats, .banner { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
header { display: flex; justify-content: space-between; gap: 1rem; align-items: end; padding: 1.4rem 0 0.6rem; }
.header-meta { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.7rem; color: var(--brass); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin: 0.8rem auto; }
.stats strong { display: block; font-size: 1.45rem; margin-top: 0.25rem; }
.stats span, table th { color: var(--muted); font-size: 0.82rem; }
.banner { background: #3a2a22; border: 1px solid #6a4638; color: #f0d2c6; padding: 0.7rem 0.9rem; border-radius: 12px; }
.layout { display: grid; grid-template-columns: 340px 1fr; gap: 0.8rem; padding-bottom: 2rem; }
.stack, .stack-form { display: grid; gap: 0.8rem; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0.8rem 0; }
label { display: grid; gap: 0.25rem; color: var(--muted); font-size: 0.85rem; }
input, select { background: #12100c; border: 1px solid var(--line); border-radius: 10px; padding: 0.55rem 0.65rem; width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.nodes-head { display: flex; justify-content: space-between; gap: 0.8rem; align-items: center; }
.nodes-head input { max-width: 280px; }
.table-wrap { overflow: auto; max-height: calc(100vh - 180px); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.55rem 0.4rem; border-bottom: 1px solid #2c261d; white-space: nowrap; }
tbody tr:hover { background: #282218; }
tr.best td:first-child { box-shadow: inset 3px 0 var(--brass); }
tr.dead { color: var(--muted); }
.tag { font-size: 0.75rem; border-radius: 999px; padding: 0.1rem 0.45rem; border: 1px solid var(--line); }
.tag.on { color: var(--ink); background: var(--brass); border-color: var(--brass); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.provider { padding-bottom: 0.7rem; border-bottom: 1px solid var(--line); margin-bottom: 0.7rem; }
.provider strong { display: block; }
@media (max-width: 900px) {
  .stats, .layout, .grid { grid-template-columns: 1fr; }
  .table-wrap { max-height: none; }
  header { align-items: start; flex-direction: column; }
}
