:root {
  --ink: #2b2620;
  --paper: #f7f3ea;
  --card: #fffdf7;
  --red: #a33c2a;
  --red-soft: #c05a41;
  --line: #ddd3bd;
  --muted: #8a7f6d;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Songti SC", "Noto Serif SC", "STSong", serif;
  line-height: 1.7; font-size: 16px;
}
a { color: var(--red); }
header.top {
  background: #2e2118; color: #f2e8d5; padding: 14px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
header.top h1 { font-size: 20px; margin: 0; letter-spacing: 2px; }
header.top h1 small { font-size: 12px; color: #cbb894; letter-spacing: 1px; }
header.top nav { margin-left: auto; display: flex; gap: 14px; align-items: center; }
header.top nav a { color: #f2e8d5; text-decoration: none; font-size: 14px; }
header.top nav a:hover { text-decoration: underline; }
header.top nav a.auth-btn {
  background: var(--red); color: #fff; padding: 6px 16px; border-radius: 6px;
}
header.top nav a.auth-btn:hover { background: var(--red-soft); text-decoration: none; }
main { max-width: 880px; margin: 0 auto; padding: 20px 16px 60px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 18px 20px; margin-bottom: 18px;
}
.card h2 { margin: 0 0 10px; font-size: 18px; border-bottom: 2px solid var(--red); padding-bottom: 6px; }
.notice {
  background: #fdf6e3; border: 1px solid #e8d9a8; border-radius: 6px;
  padding: 10px 14px; font-size: 13px; color: #6d5b2a; margin-bottom: 18px;
}
form label { display: block; margin: 10px 0 4px; font-size: 14px; }
input, select, textarea, button {
  font-family: inherit; font-size: 15px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red-soft); }
button {
  background: var(--red); color: #fff; border: none; cursor: pointer;
  padding: 9px 22px; margin-top: 14px;
}
button:hover { background: var(--red-soft); }
button.ghost { background: #fff; color: var(--red); border: 1px solid var(--red); }
button.small { padding: 5px 12px; font-size: 13px; margin: 2px; }
button:disabled { opacity: .5; cursor: wait; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 140px; }
.sub-row { display: flex; gap: 8px; }
.sub-row select { flex: 1; min-width: 0; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.pillar {
  border: 1px solid var(--line); border-radius: 6px; text-align: center;
  padding: 10px 4px; background: #fff;
}
.pillar .pos { font-size: 12px; color: var(--muted); }
.pillar .gz { font-size: 28px; font-weight: bold; color: var(--red); letter-spacing: 2px; }
.pillar .ss { font-size: 13px; }
.pillar .sub { font-size: 12px; color: var(--muted); }
.dayun { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.dayun span {
  border: 1px solid var(--line); border-radius: 20px; padding: 2px 12px; font-size: 14px;
}
.dayun span.now { background: var(--red); color: #fff; border-color: var(--red); }
details.section { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 10px; background: #fff; }
details.section summary {
  cursor: pointer; padding: 10px 14px; font-weight: bold; font-size: 16px;
}
details.section .body { padding: 0 14px 12px; }
details.section .body h2, details.section .body h3 { font-size: 15px; margin: 12px 0 4px; }
details.section .body table { border-collapse: collapse; width: 100%; font-size: 13px; margin: 8px 0; }
details.section .body th, details.section .body td { border: 1px solid var(--line); padding: 4px 6px; text-align: left; }
details.section .body blockquote {
  margin: 8px 0; padding: 6px 12px; background: #fdf6e3;
  border-left: 3px solid var(--red-soft); font-size: 14px;
}
.qa-item { border-bottom: 1px solid var(--line); padding: 10px 0; }
.qa-item .q { font-weight: bold; }
.qa-item .q::before { content: "问："; color: var(--red); }
.qa-item .a::before { content: "答："; color: var(--red); }
.qa-item .meta { font-size: 12px; color: var(--muted); }
.modal-back {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45);
  align-items: center; justify-content: center; z-index: 10;
}
.modal-back.open { display: flex; }
.modal { background: #fff; border-radius: 8px; padding: 22px; width: 340px; max-width: 92vw; }
.modal h3 { margin-top: 0; }
.modal input { width: 100%; margin-bottom: 10px; }
footer { max-width: 880px; margin: 0 auto; padding: 0 16px 40px; font-size: 12px; color: var(--muted); }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; }
table.data th, table.data td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
table.data th { background: #f0e9d6; }
.stat { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 18px; margin: 0 10px 10px 0; }
.stat b { font-size: 22px; color: var(--red); display: block; }
.hidden { display: none !important; }
.err { color: var(--red); font-size: 14px; }
.ok { color: #2e7d32; font-size: 14px; }

/* 手机端：表单改为单列，避免两栏挤在一起 */
@media (max-width: 640px) {
  main { padding: 14px 12px 40px; }
  .card { padding: 14px 14px; overflow-x: auto; }
  header.top { padding: 10px 14px; gap: 10px; }
  header.top h1 { font-size: 18px; }
  .row { flex-direction: column; gap: 0; }
  .row > div { min-width: 0; }
  input, select, textarea { font-size: 16px; }
  #btn-paipan { width: 100%; }
  .pillar .gz { font-size: 24px; }
  footer { padding: 0 12px 32px; }
}
