:root {
  /* 配色：寺庙朱红。变量名沿用最初的 purple，实际是主色（朱红） */
  --purple: #a8251c;
  --purple-dark: #7f1a13;
  --tint: #fbeae6;
  --yellow: #f2b92b;
  --price: #a8251c;
  --ink: #2a1a14;
  --muted: #6b5a52;
  --line: #eadfd3;
  --ground: #fff8ee;
  --placeholder: #eae4dc;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; line-height: 1.35; }
h2 { font-size: 18px; }
a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--purple-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
[hidden] { display: none !important; }

.container { max-width: 1160px; margin: 0 auto; padding: 20px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1 1 0; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.bold { font-weight: 700; }
.price { color: var(--price); font-weight: 700; }
.price-lg { font-size: 34px; line-height: 1.1; }
.strike { text-decoration: line-through; }
.error { color: var(--price); }
.ok { color: var(--purple-dark); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border: 1.5px solid transparent; border-radius: 8px;
  font-weight: 700; background: none; white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dark); color: #fff; }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-outline { border-color: var(--purple); color: var(--purple); background: #fff; }
.btn-plain { border-color: var(--line); color: var(--ink); background: #fff; font-weight: 500; }
.btn-danger { border-color: var(--purple-dark); color: var(--purple-dark); background: #fff; }
.btn-lg { min-height: 52px; font-size: 16px; }
.btn-block { width: 100%; }
.link-btn { min-height: 44px; display: inline-flex; align-items: center; padding: 0 6px; border: 0; background: none; color: var(--purple); font-weight: 500; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field > label { font-size: 13px; font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
textarea.input { min-height: 96px; resize: vertical; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--purple); }

.card { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.note { padding: 12px 14px; border-radius: 8px; background: var(--tint); color: var(--purple-dark); font-size: 13px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; background: var(--tint); color: var(--purple-dark); font-size: 12px; font-weight: 500; }
.tag-yellow { background: var(--yellow); color: var(--ink); }
.tag-grey { background: var(--placeholder); color: var(--ink); }
.tag-red { background: #fdecec; color: #9b1c1c; font-weight: 700; }
.state { padding: 48px 16px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; border: 0; border-radius: 22px; background: var(--ground); color: var(--ink); font-size: 14px; }
.chip[aria-pressed="true"], .chip[aria-current="page"] { background: var(--purple); color: #fff; font-weight: 700; }

.photo { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--placeholder); }
.photo-empty { display: flex; align-items: center; justify-content: center; font-size: 12px; color: #5f554c; }
.thumb { width: 64px; height: 64px; flex: none; aspect-ratio: auto; border-radius: 8px; }
.avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--tint); color: var(--purple-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px 16px; }
.item-card { display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.item-card:hover { color: var(--ink); }
.item-card .title { font-size: 14px; font-weight: 500; line-height: 1.45; }

.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.list-row:hover { color: var(--ink); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; white-space: nowrap; }
th { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--ground); }
tr:last-child td { border-bottom: 0; }
td.wrap { white-space: normal; min-width: 220px; }
