/* 鸢谱 · 全站基础样式（宣纸 / 朱砂 / 墨 / 描金） */
:root {
  --paper: #f7f2e7;
  --paper-2: #fffbf2;
  --paper-3: #f1e9d8;
  --ink: #2b2622;
  --ink-2: #6b6157;
  --ink-3: #9a8f80;
  --red: #9e2b25;
  --red-2: #c0392b;
  --gold: #c9a063;
  --gold-2: #e8c98c;
  --jade: #3f7d5e;
  --blue: #3a5a6c;
  --line: #e6dcc8;
  --line-2: #d8cbb1;
  --shadow: 0 8px 28px rgba(43, 38, 34, .09);
  --shadow-sm: 0 3px 12px rgba(43, 38, 34, .07);
  --radius: 14px;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: #ede6d7;
  background-image: radial-gradient(circle at 20% 10%, rgba(201,160,99,.12), transparent 40%),
                    radial-gradient(circle at 85% 80%, rgba(158,43,37,.07), transparent 45%);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #d8cbb1; border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

.serif { font-family: var(--serif); }
.muted { color: var(--ink-2); }
.tiny { font-size: 11px; }
.small { font-size: 12px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; gap: 8px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--red); color: #fff; transition: .2s; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(158,43,37,.22);
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn.ghost { background: transparent; color: var(--red); border: 1px solid var(--red); box-shadow: none; }
.btn.gold { background: linear-gradient(135deg, #c9a063, #e0bb78); color: #3a2a16; box-shadow: 0 4px 12px rgba(201,160,99,.3); }
.btn.plain { background: var(--paper-3); color: var(--ink); box-shadow: none; }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--paper-2);
  font-size: 12px; color: var(--ink-2); transition: .18s;
}
.chip.on { background: var(--red); border-color: var(--red); color: #fff; }
.chip.gold.on { background: var(--gold); border-color: var(--gold); color: #3a2a16; }

.card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 600;
  background: #f3e6d2; color: #8a6a37;
}
.badge.green { background: #e3f0e7; color: #3f7d5e; }
.badge.red { background: #f8e5e1; color: #a33a2d; }
.badge.blue { background: #e3edf2; color: #3a5a6c; }
.badge.gray { background: #efece5; color: #8a8175; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 12px; }
.section-title h3 { margin: 0; font-family: var(--serif); font-size: 18px; letter-spacing: 1px; }
.section-title .more { font-size: 12px; color: var(--ink-3); }
.section-title .sub { font-size: 11px; color: var(--ink-3); letter-spacing: 0; }

.paper-bg {
  background-color: var(--paper-2);
  background-image: repeating-linear-gradient(0deg, rgba(160,140,105,.035) 0 1px, transparent 1px 4px);
}

/* 弹层 */
.mask {
  position: fixed; inset: 0; background: rgba(30, 25, 20, .55); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fadeIn .18s ease;
}
.modal {
  background: var(--paper-2); border-radius: 18px; width: 100%; max-width: 460px;
  max-height: 88vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.28);
  animation: rise .22s ease;
}
.modal-wide { max-width: 560px; }
.modal .modal-head { position: sticky; top: 0; background: var(--paper-2); z-index: 2;
  padding: 16px 18px 12px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal .modal-head h3 { margin: 0; font-family: var(--serif); font-size: 18px; }
.modal .modal-body { padding: 16px 18px 22px; }
.modal-close { font-size: 20px; color: var(--ink-3); line-height: 1; padding: 4px 8px; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) } to { opacity: 1; transform: none } }

#toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 120;
  background: rgba(43,38,34,.92); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; max-width: 84vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--paper); font-size: 14px; outline: none; transition: .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--gold); background: #fff; }
.field textarea { resize: vertical; min-height: 76px; line-height: 1.6; }
.hint { font-size: 11px; color: var(--ink-3); line-height: 1.6; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.center { text-align: center; }
.spin { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--red);
  border-radius: 50%; animation: spin .8s linear infinite; margin: 18px auto; }
@keyframes spin { to { transform: rotate(360deg) } }
