:root {
  --bg: #f5f7f8;
  --panel: #ffffff;
  --line: #e4e9ea;
  --line-strong: #cfd8d9;
  --text: #16212b;
  --text-2: #3a4753;
  --text-3: #6b7885;
  --brand: #0f766e;
  --brand-soft: #e8f3f1;
  --green: #0f9d58;
  --green-soft: #e9f6ef;
  --amber: #a86400;
  --amber-soft: #fdf3e3;
  --red: #d1342b;
  --red-soft: #fdeceb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 36, 58, .04), 0 6px 18px rgba(16, 36, 58, .06);
}
 
* { box-sizing: border-box; margin: 0; padding: 0; }
 
html, body { height: 100%; }
 
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 13.5px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-y: auto;
  user-select: none;
}
 
.wrap {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 26px 20px 18px;
}
 
/* ---------------------------------------------------------------- 头部 */
 
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(140deg, #2f7bff, #005bff);
  color: #fff; font-size: 15px; font-weight: 700; letter-spacing: -.4px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 91, 255, .28);
}
.brand .name { font-size: 15.5px; font-weight: 650; letter-spacing: -.2px; }
.brand .tag { font-size: 11px; color: var(--text-3); margin-top: 1px; }
 
.lead {
  margin: 20px 0 14px;
  font-size: 13px; line-height: 1.7; color: var(--text-2);
}
.lead b { color: var(--text); font-weight: 600; }
 
/* ---------------------------------------------------------------- 卡片 */
 
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}
 
.mc-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; color: var(--text-3); margin-bottom: 8px;
}
.mc-label .anchor { cursor: help; border-bottom: 1px dashed var(--line-strong); }
 
.mc-row { display: flex; align-items: center; gap: 8px; }
 
.mc {
  flex: 1 1 auto; min-width: 0;
  font-family: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  font-size: 16px; font-weight: 600; letter-spacing: 1.4px;
  color: var(--text); background: #f7f9fc;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 10px; text-align: center;
  user-select: all; cursor: text;
  font-variant-numeric: tabular-nums;
}
 
.btn {
  height: 34px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: #fff;
  color: var(--text-2); font-size: 12.5px; font-weight: 520;
  font-family: inherit; cursor: pointer;
  transition: all .14s; white-space: nowrap;
}
.btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  width: 100%; height: 38px; margin-top: 12px;
  background: var(--brand); border-color: var(--brand); color: #fff;
  font-size: 13.5px; font-weight: 600;
}
.btn.primary:hover { background: #0050e0; border-color: #0050e0; color: #fff; }
.btn.primary:disabled { opacity: .55; cursor: default; transform: none; }
 
/* ---------------------------------------------------------------- 表单 */
 
.field { margin-top: 18px; }
.field > label {
  display: block; font-size: 11.5px; color: var(--text-2);
  margin-bottom: 7px; font-weight: 520;
}
 
#code {
  width: 100%; height: 42px;
  font-family: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  font-size: 17px; font-weight: 600; letter-spacing: 2px;
  text-align: center; color: var(--text);
  background: #fbfcfd; border: 1px solid var(--line-strong);
  border-radius: 9px; outline: none;
  transition: border-color .15s, box-shadow .15s;
  user-select: text;
}
#code::placeholder { letter-spacing: 1px; font-weight: 400; color: var(--text-3); }
#code:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(0, 91, 255, .1); }
#code.err { border-color: var(--red); box-shadow: 0 0 0 3px rgba(217, 48, 37, .1); }
#code.ok { border-color: var(--green); box-shadow: 0 0 0 3px rgba(15, 157, 88, .12); }
 
.msg {
  margin-top: 10px; font-size: 12px; line-height: 1.6;
  min-height: 19px; color: var(--text-3);
}
.msg.bad { color: var(--red); }
.msg.good { color: var(--green); }
 
/* ---------------------------------------------------------------- 说明 */
 
.notes { margin-top: auto; padding-top: 18px; }
.notes summary {
  font-size: 11.5px; color: var(--text-3); cursor: pointer;
  list-style: none; padding: 4px 0;
}
.notes summary::-webkit-details-marker { display: none; }
.notes summary::before { content: '▸ '; }
.notes[open] summary::before { content: '▾ '; }
.notes-body {
  font-size: 11.5px; line-height: 1.75; color: var(--text-3);
  padding: 8px 0 0;
}
.notes-body b { color: var(--text-2); font-weight: 520; }
 
.foot {
  margin-top: 14px; padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between;
  font-size: 10.5px; color: var(--text-3);
}
 
@media (max-width: 400px) {
  .wrap { padding: 20px 14px 14px; }
  .mc { font-size: 14.5px; letter-spacing: 1px; padding: 8px; }
  #code { font-size: 15.5px; letter-spacing: 1.4px; }
  .lead { margin: 16px 0 12px; }
}
