:root {
  --paper: #f6f1e8;
  --card: #fffdf8;
  --ink: #2b2a25;
  --muted: #7d786d;
  --line: #e6ddcc;
  --accent: #c46f4a;
  --accent-soft: #f3e2d7;
  --sage: #6f8b7a;
  --sage-soft: #e4ece6;
  --gold: #b98a44;
  --danger: #b4483f;
  --shadow: 0 10px 30px rgba(63, 52, 38, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; color: inherit; }

.wrap { max-width: 720px; margin: 0 auto; padding: 20px 16px 56px; }

.kicker { font-size: 11px; letter-spacing: 0.18em; color: var(--muted); text-transform: uppercase; }

h1 { font-family: "Songti SC", "STSong", Georgia, serif; font-size: 28px; margin: 5px 0 6px; }

.sub { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.card h2 { font-size: 15px; margin: 0 0 12px; }
.card h3 { font-size: 12px; color: var(--muted); margin: 0 0 8px; font-weight: 600; }

.btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 15px;
  cursor: pointer;
  transition: 0.2s;
  font-size: 14px;
  background: transparent;
}

.btn.primary { background: var(--accent); color: #fff8f0; width: 100%; padding: 14px; font-size: 15px; }
.btn.primary:disabled { opacity: 0.5; cursor: default; }
.btn.ghost { border: 1px solid var(--line); }
.btn.sage { background: var(--sage); color: #f5fbf6; }
.btn.small { padding: 7px 11px; font-size: 12px; }

.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; max-width: none; margin: 0; padding: 0; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }

input[type="text"], input[type="number"], input[type="date"], textarea, select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  background: #fffdf8;
  width: 100%;
}

textarea { resize: vertical; min-height: 80px; line-height: 1.6; }

input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

label.field { display: block; margin-bottom: 10px; }
label.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }

.muted { color: var(--muted); font-size: 12px; line-height: 1.65; }
.tiny { font-size: 11px; color: var(--muted); }

.pill { display: inline-block; padding: 4px 9px; border-radius: 999px; background: var(--accent-soft); font-size: 11px; color: #8c4526; }
.pill.sage { background: var(--sage-soft); color: #41604f; }

.locked {
  background: #fcf4ea;
  border: 1px dashed #e2c9b2;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  color: #8c5a3c;
  line-height: 1.6;
  margin-top: 10px;
}

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fffaf0; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: 0.25s; z-index: 60;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(44, 42, 37, 0.45);
  display: none; align-items: center; justify-content: center; padding: 18px; z-index: 50;
}
.modal-backdrop.show { display: flex; }
.modal { background: var(--card); border-radius: 20px; padding: 22px; max-width: 420px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal h2 { margin: 0 0 8px; font-size: 18px; }

.pro-link { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 12px; font-size: 12px; cursor: pointer; }

.footer { text-align: center; color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 18px; }

.hide { display: none !important; }

@media (max-width: 420px) {
  .wrap { padding: 16px 13px 48px; }
  .card { padding: 15px; }
  h1 { font-size: 24px; }
}
