:root {
  --bg: #16110d;
  --surface: #211a14;
  --surface-2: #2b221a;
  --border: #3a2e23;
  --text: #f3ece4;
  --muted: #b7a898;
  --accent: #ff8a3d;
  --accent-strong: #ff6a14;
  --ok: #5fd08a;
  --ok-bg: rgba(95, 208, 138, 0.12);
  --warn: #f2c14e;
  --warn-bg: rgba(242, 193, 78, 0.12);
  --radius: 12px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); }
a:hover { color: var(--accent-strong); }

code, .code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.05em 0.35em;
  font-size: 0.92em;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.site-header, main, .site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.site-header { padding-top: 14px; padding-bottom: 6px; }

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.brand::before { content: "▲ "; color: var(--accent); }
.brand:hover { color: var(--accent); }

h1 {
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  line-height: 1.15;
  margin: 18px 0 8px;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 40px 0 12px;
}

.lede { color: var(--muted); margin: 0 0 12px; }
.lede strong { color: var(--text); }

.checked {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

.codes h2 { margin-top: 28px; }

.code-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-table th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 10px 14px;
  background: var(--surface-2);
}

.code-table td {
  padding: 14px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.code-table .code {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.code-table tr.is-newest .code { color: var(--accent); }

.status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-active { color: var(--ok); background: var(--ok-bg); }
.status-disputed { color: var(--warn); background: var(--warn-bg); }
.status a { color: inherit; }

.copy {
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #1b120b;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 88px;
  min-height: 44px;
  padding: 0 14px;
  cursor: pointer;
}
.copy:hover { background: var(--accent-strong); }
.copy:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.copy.done { background: var(--ok); }

.method { color: var(--muted); font-size: 0.9rem; margin: 10px 0 0; }

ul, ol { padding-left: 1.3em; }
li { margin: 6px 0; }
li::marker { color: var(--accent); }

.steps li { padding-left: 4px; }

.shot { margin: 16px 0; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.shot figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 6px; }

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 10px 0;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 2px; color: var(--muted); }
.faq details p strong { color: var(--text); }

.site-footer {
  margin-top: 48px;
  padding-top: 20px;
  padding-bottom: 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 12px;
  width: max-content;
  max-width: calc(100% - 32px);
  text-align: center;
  transition: opacity 0.15s, transform 0.15s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 手机：表格改成卡片，code 和复制按钮同一行 */
@media (max-width: 600px) {
  .code-table, .code-table tbody, .code-table tr, .code-table td { display: block; }
  .code-table thead { display: none; }
  .code-table { background: none; border: 0; border-radius: 0; }
  .code-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "code copy" "reward copy" "status status";
    gap: 4px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
  }
  .code-table tr.is-newest { border-color: var(--accent); }
  .code-table td { border: 0; padding: 0; }
  .code-table td.c-code { grid-area: code; }
  .code-table td.c-reward { grid-area: reward; color: var(--muted); }
  .code-table td.c-status { grid-area: status; margin-top: 6px; }
  .code-table td.c-copy { grid-area: copy; align-self: center; }
  .code-table .code { font-size: 1.25rem; }
}
