* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: #f4f6f8;
  font-family: system-ui, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #1c2430;
  padding: 40px 16px;
}
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(20, 40, 80, .08);
  padding: 28px;
  width: 100%;
  max-width: 420px;
}
.card.wide { max-width: 760px; }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 0 0 12px; }
label { display: block; flex: 1; font-size: 14px; color: #5a6675; margin: 10px 0 4px; }
input, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d4dae2;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
}
input:focus { outline: 2px solid #3b82f6; border-color: transparent; }
button, .button {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid #d4dae2;
  border-radius: 8px;
  background: #eef2f7;
  color: #1c2430;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .button:hover { background: #e2e8f0; }
.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.primary:hover { background: #1d4fd7; }
.small { padding: 4px 10px; font-size: 13px; }
.tabs { display: flex; gap: 8px; margin-bottom: 8px; }
.tab { flex: 1; }
.tab.active { background: #2563eb; border-color: #2563eb; color: #fff; }
.msg { color: #c2410c; font-size: 14px; min-height: 1.2em; margin: 8px 0; }
.ok { color: #15803d; }
.muted { color: #8a94a3; font-size: 13px; }
.row { display: flex; gap: 12px; align-items: flex-end; margin: 10px 0; flex-wrap: wrap; }
.row.between { justify-content: space-between; align-items: center; }
.box { border: 1px solid #e3e8ee; border-radius: 10px; padding: 16px; margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #eef1f5; }
th { color: #5a6675; font-weight: 600; }
.result {
  background: #0f172a;
  color: #d7e3ff;
  padding: 14px;
  border-radius: 8px;
  overflow: auto;
  font-size: 14px;
  margin: 12px 0;
}
.kv { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,.15); }
.kv:last-child { border-bottom: none; }
textarea { font-family: ui-monospace, Consolas, monospace; resize: vertical; }
a { color: #2563eb; }
