:root {
  --ink: #171A21;
  --ink-2: #3C4351;
  --muted: #6B7484;
  --line: #E2E6ED;
  --bg: #F4F6FA;
  --card: #FFFFFF;
  --brand: #3355CC;
  --brand-soft: #EAEEFB;
  --gold: #D99215;
  --ok: #21855B;
  --ok-soft: #E6F4ED;
  --bad: #C93B30;
  --bad-soft: #FBEBE9;
  --radius: 10px;
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

button {
  cursor: pointer;
  border: none;
  background: none;
}
button:disabled { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  transition: filter .12s;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn.ghost { background: var(--card); color: var(--ink-2); border: 1px solid var(--line); }
.btn.ghost:hover:not(:disabled) { background: var(--bg); filter: none; }
.btn.danger { background: var(--bad); }
.btn.big { padding: 15px 24px; font-size: 17px; width: 100%; }

.field {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}
.field:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hide { display: none !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: rgba(23, 26, 33, .93);
  color: #fff;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 14.5px;
  max-width: 88vw;
  text-align: center;
  z-index: 99;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
