:root {
  --bg: #f3efe6;
  --ink: #1c1914;
  --muted: #6b6458;
  --line: #d9d0c1;
  --card: #fffcf7;
  --accent: #0f6b4c;
  --accent-2: #c45c26;
  --danger: #a12828;
  --ok: #0f6b4c;
  --shadow: 0 10px 30px rgba(28, 25, 20, 0.08);
  --font: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --display: "Source Han Serif SC", "Noto Serif SC", "Songti SC", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #e7f2ec 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #f7e7dc 0%, transparent 50%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(920px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 64px; }
.wrap-narrow { width: min(560px, calc(100% - 32px)); margin: 0 auto; padding: 40px 0 72px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 28px;
}
.brand { font-family: var(--display); font-size: 1.35rem; font-weight: 700; color: var(--ink); }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.95rem; }

h1, h2, h3 { font-family: var(--display); line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: 1.8rem; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

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

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

label { display: block; font-size: 0.9rem; color: var(--muted); margin-bottom: 6px; }
input, textarea, select, button {
  font: inherit; color: inherit;
}
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 11px 12px;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: #8bb9a5;
  box-shadow: 0 0 0 3px rgba(15, 107, 76, 0.12);
}
textarea { min-height: 220px; resize: vertical; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 999px; padding: 11px 18px; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 600;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn-secondary { background: #2d2a24; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px;
}
.btn-danger { background: var(--danger); }
.btn-block { width: 100%; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line);
  vertical-align: top; font-size: 0.95rem;
}
.table th { color: var(--muted); font-weight: 600; }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: #e8f3ee; color: var(--accent); font-size: 0.8rem;
}
.tag-warn { background: #f8eadf; color: var(--accent-2); }
.tag-danger { background: #f6e4e4; color: var(--danger); }

.flash {
  padding: 12px 14px; border-radius: 12px; margin-bottom: 16px;
  background: #e8f3ee; color: var(--ok); border: 1px solid #c8e2d5;
}
.flash-error { background: #f6e4e4; color: var(--danger); border-color: #ecc1c1; }

.pay-hero { text-align: center; }
.price {
  font-family: var(--display); font-size: 2.4rem; font-weight: 700;
  color: var(--accent-2); margin: 8px 0 4px;
}
.qr-box {
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px; border: 1px dashed var(--line); border-radius: 16px; background: #fff;
  margin: 18px 0;
}
.qr-box img { width: 220px; height: 220px; }

.article-body {
  font-size: 1.05rem;
  line-height: 1.85;
}
.article-body img { max-width: 100%; border-radius: 12px; }
.article-body h2, .article-body h3 { margin-top: 1.4em; }
.article-meta { color: var(--muted); margin-bottom: 18px; }

.login-card { margin-top: 10vh; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; word-break: break-all; }
