:root {
  --paper: #fffdf8;
  --wash: #efe8da;
  --ink: #2a261f;
  --muted: #5e574c;
  --gold: #8a6a32;
  --line: #d7c7a4;
  --soft: #f7f1e6;
  --ok: #276749;
  --focus: #6b4e24;
  --accent: #c4a265;
  --chip: #e4d6b6;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font-family: "Noto Sans CJK SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
body { min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--focus); text-decoration: none; }
a:hover { color: var(--gold); text-decoration: underline; }
img { max-width: 100%; }
.skip {
  position: absolute; left: 12px; top: -48px; background: var(--paper); padding: 8px 12px; z-index: 5;
}
.skip:focus { top: 12px; }
.topbar, .foot {
  width: min(1080px, calc(100% - 24px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
}
.topbar { flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { height: 44px; width: auto; display: block; }
.brand .words { display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { font-weight: 650; letter-spacing: .02em; }
.brand small { color: var(--muted); font-size: .78rem; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nav a, .nav .who { color: var(--muted); font-size: .9rem; }
.nav .who { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrap { width: min(1080px, calc(100% - 24px)); margin: 8px auto 36px; flex: 1; }
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  padding: 20px 16px 24px;
  margin-bottom: 16px;
}
h1 { font-size: 1.45rem; line-height: 1.3; margin: 0 0 8px; font-weight: 650; }
h2 { font-size: 1.08rem; margin: 0 0 10px; }
.lede, .fine, .hint { color: var(--muted); }
.fine, .hint { font-size: .9rem; }
.logo-hero { display: flex; justify-content: center; margin: 4px 0 16px; }
.logo-hero img { height: 72px; width: auto; }
form.stack, .stack { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: .92rem; color: var(--focus); }
input, select, textarea, button {
  font: inherit;
  color: var(--ink);
}
input, select, textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 11px 12px;
  min-height: 44px;
  outline: none;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 162, 101, .35);
}
input:invalid, textarea:invalid { box-shadow: none; }
.btn, button[type="submit"], .btn-lite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 4px;
  border: 1px solid var(--focus);
  background: var(--focus);
  color: #fffdf8;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}
.btn:hover, button[type="submit"]:hover { background: var(--gold); border-color: var(--gold); text-decoration: none; color: #fffdf8; }
.btn-lite {
  background: var(--soft);
  color: var(--focus);
  border-color: var(--line);
}
.btn-lite:hover { background: var(--chip); color: var(--focus); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.flash, .notice {
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 10px 12px;
  margin: 0 0 14px;
  color: var(--focus);
}
.flash.ok { border-color: #9bb8a6; background: #eef6f0; color: var(--ok); }
.flash.warn, .notice.warn { border-color: var(--accent); background: var(--soft); color: var(--focus); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.chip {
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 4px 9px;
  font-size: .86rem;
  color: var(--muted);
}
.chip strong { color: var(--ink); font-weight: 650; }
.meta-grid, .stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.stat {
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 12px;
}
.stat .n { font-size: 1.4rem; font-weight: 700; color: var(--focus); }
.stat .k { color: var(--muted); font-size: .82rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .9rem; }
th, td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 9px 10px;
  vertical-align: top;
  white-space: nowrap;
}
th { color: var(--gold); font-weight: 650; background: var(--soft); position: sticky; top: 0; }
td.wrap, th.wrap { white-space: normal; min-width: 120px; }
.status { display: inline-block; padding: 2px 8px; border: 1px solid var(--line); background: var(--soft); }
.status.signed { border-color: #9bb8a6; background: #eef6f0; color: var(--ok); }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.filters .wide { grid-column: 1 / -1; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .04em; }
.empty { color: var(--muted); padding: 8px 0; }
.foot { color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); width: 100%; justify-content: center; text-align: center; }
.inline-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inline-form select, .inline-form input { min-height: 40px; width: auto; }
.inline-form button { min-height: 40px; }
.invite-box {
  font-size: 1.3rem;
  letter-spacing: .16em;
  background: var(--soft);
  border: 1px dashed var(--accent);
  padding: 10px 12px;
  text-align: center;
  color: var(--focus);
  font-weight: 700;
}
@media (min-width: 840px) {
  .panel { padding: 24px 22px 28px; }
  h1 { font-size: 1.7rem; }
  table { min-width: 100%; }
}
.link-preview { word-break: break-all; margin: 8px 0 0; }
.invite-panel .invite-box { margin: 8px 0 14px; }
.swipe-hint { display: none; margin: 0 0 8px; }
@media (max-width: 839px) {
  .swipe-hint { display: block; }
}
#copy-toast { display: none; }
.report-cards { display: none; }
.report-card {
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 14px 12px 16px;
  margin: 0 0 12px;
}
.report-card h3 { margin: 0 0 6px; font-size: 1.02rem; }
.report-card .stack { margin-top: 10px; }
@media (max-width: 839px) {
  .report-cards { display: block; }
  .desk-table { display: none; }
}
@media (min-width: 840px) {
  .report-cards { display: none; }
  .desk-table { display: block; overflow-x: auto; }
}
