:root {
  --ink: #1a1410;
  --paper: #fff8ea;
  --cinnabar: #b42323;
  --cinnabar-2: #d44538;
  --gold: #efc56a;
  --mute: #e4d3b4;
  --line: #c9a36a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Songti SC", sans-serif;
  color: var(--paper);
  background: #120e0b url("/static/ink-silk.png") center/cover no-repeat fixed;
  letter-spacing: 0.04em;
}
.mist {
  position: fixed; inset: 0;
  background: rgba(10, 8, 6, 0.72);
  pointer-events: none;
}
#view { position: relative; z-index: 1; min-height: 100%; }

.login {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}
.seal-card {
  width: min(420px, 92vw);
  text-align: center;
  padding: 36px 32px 40px;
  background: #1c1612;
  border: 1px solid var(--gold);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
}
.ring {
  width: 168px; height: 168px; margin: 0 auto 18px;
  border-radius: 50%;
  background: #0a0806 url("/static/zodiac-ring.png") center/cover;
  box-shadow: 0 0 0 1px var(--gold);
}
.brand {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: #fff8ea;
}
.sub {
  margin-top: 8px;
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
}
.field { margin-top: 22px; text-align: left; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0.28em;
  margin-bottom: 8px;
}
.field input, .row input {
  width: 100%;
  height: 46px;
  border: 1px solid #c9a36a;
  background: #2a221c;
  color: #fff8ea;
  padding: 0 14px;
  font-size: 16px;
  outline: none;
  font-family: inherit;
}
.field input:focus, .row input:focus { border-color: #efc56a; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer; font-family: inherit;
  letter-spacing: 0.32em;
}
.btn-seal {
  margin-top: 28px;
  width: 100%;
  height: 48px;
  background: #c43a2c;
  color: #fff8ea;
  font-size: 16px;
  font-weight: 700;
}
.btn-seal:hover { filter: brightness(1.08); }
.err { min-height: 24px; margin-top: 12px; color: #ffc9bc; font-size: 13px; }

.shell {
  max-width: 980px;
  margin: 40px auto 80px;
  padding: 32px 32px 44px;
  background: #1c1612;
  border: 1px solid var(--gold);
  box-shadow: 0 24px 70px rgba(0,0,0,0.5);
}
.top {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid #8c7348;
}
.top h1 {
  font-size: 28px; letter-spacing: 0.4em; font-weight: 700; color: #fff8ea;
}
.top .hint { color: var(--gold); font-size: 14px; letter-spacing: 0.24em; margin-top: 6px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-ghost, .btn-gold {
  height: 40px; padding: 0 18px; font-size: 14px; font-weight: 700;
}
.btn-ghost {
  background: #2a221c; color: #fff8ea;
  border: 1px solid #c9a36a;
}
.btn-gold {
  background: #2a221c; color: var(--gold);
  border: 1px solid var(--gold);
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0 22px;
}
.stat {
  padding: 22px 24px;
  border: 1px solid #8c7348;
  background: #2a221c;
}
.stat b {
  display: block;
  font-size: 42px;
  color: #efc56a;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.stat span { color: #efe0c4; font-size: 14px; letter-spacing: 0.22em; }

.online-row {
  min-height: 28px;
  margin-bottom: 18px;
  color: #efe0c4;
  font-size: 15px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 10px 8px 0;
  padding: 4px 10px;
  border: 1px solid #c43a2c;
  color: #ffe2d6;
  font-size: 14px;
  background: #2a1816;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #ff5a45;
}

.list { display: flex; flex-direction: column; gap: 10px; }
.card {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  background: #2a221c;
  border: 1px solid #8c7348;
  cursor: pointer;
}
.card:hover { border-color: #efc56a; }
.avatar {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 28px;
  background: #1c1612;
}
.meta .name { font-size: 20px; letter-spacing: 0.12em; color: #fff8ea; font-weight: 700; }
.meta .desc { margin-top: 4px; color: #efe0c4; font-size: 14px; }
.right { text-align: right; color: #efe0c4; font-size: 14px; }
.right .on { color: #ffb6a6; font-weight: 700; }

.modal {
  position: fixed; inset: 0; z-index: 9;
  background: rgba(8,6,5,0.82);
  display: grid; place-items: center;
  padding: 20px;
}
.panel {
  width: min(560px, 96vw);
  background: #1c1612;
  border: 1px solid var(--gold);
  padding: 28px;
  max-height: 92vh;
  overflow: auto;
  color: #fff8ea;
}
.panel h2 {
  font-size: 22px; letter-spacing: 0.28em; margin-bottom: 18px; color: #fff8ea;
}
.row { margin-bottom: 14px; }
.row label { display: block; color: var(--gold); font-size: 13px; letter-spacing: 0.2em; margin-bottom: 6px; }
.row input { height: 42px; }
.qr-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.qr-box { text-align: center; border: 1px solid #8c7348; padding: 16px; background: #2a221c; }
.qr-box img { width: 200px; height: 200px; background: #fff; padding: 8px; }
.qr-box p { margin: 10px 0 6px; color: var(--gold); letter-spacing: 0.2em; font-weight: 700; }
.link {
  font-size: 12px; color: #efe0c4; word-break: break-all;
  font-family: ui-monospace, Consolas, monospace;
  letter-spacing: 0;
}
.pair { display: flex; gap: 8px; margin-top: 8px; }
.tiny {
  flex: 1; height: 34px; font-size: 13px; font-weight: 700;
  background: #2a221c; color: #fff8ea;
  border: 1px solid #c9a36a;
  cursor: pointer; font-family: inherit; letter-spacing: 0.16em;
}
.danger { color: #ffb6a6; border-color: #c43a2c !important; }

@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr; }
  .card { grid-template-columns: 48px 1fr; }
  .right { grid-column: 2; text-align: left; }
  .top { flex-direction: column; align-items: flex-start; }
  .brand { font-size: 30px; }
}
