:root {
  --ink: #2a2622;
  --muted: #7a7169;
  --bg: #f7f4ee;
  --panel: #ffffff;
  --accent: #a1492e;
  --line: #e5ddd0;
  --max-width: 680px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
}

.serif { font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Nav ---------- */
header.nav { border-bottom: 1px solid var(--line); padding: 1.5rem 0; }
header.nav .wrap { display: flex; align-items: baseline; justify-content: space-between; }
.nav .brand { font-family: Georgia, serif; font-size: 1.4rem; font-weight: 700; text-decoration: none; color: var(--ink); }
.nav .tagline { font-size: 0.82rem; color: var(--muted); margin-top: 0.2rem; }

/* ---------- Post list ---------- */
main { padding: 3rem 0 5rem; }
.post-card {
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}
.post-card:first-child { padding-top: 0; }
.post-card .post-date {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.post-card h2 {
  font-family: Georgia, serif;
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}
.post-card .post-body {
  color: #47413a;
  font-size: 1.02rem;
  max-width: 68ch;
  white-space: pre-wrap;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 3.5rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}
footer.site-footer a { color: var(--muted); }

/* ---------- Admin ---------- */
body.admin { background: #f1efe6; }
.admin-badge {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  background: var(--ink);
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  margin-left: 0.6rem;
  vertical-align: middle;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2rem;
  max-width: 460px;
  margin: 4rem auto;
}
.panel h2 { font-family: Georgia, serif; margin: 0 0 0.4rem; }
.panel p.hint { color: var(--muted); font-size: 0.88rem; margin: 0 0 1.5rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.4rem; font-weight: 600; }
.field input, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.96rem;
  font-family: inherit;
  background: var(--bg);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { min-height: 160px; resize: vertical; font-family: Georgia, serif; }

.btn {
  width: 100%;
  padding: 0.8rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.96rem;
  cursor: pointer;
}
.btn:hover { background: #8a3d26; }
.btn-quiet {
  background: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: underline;
  width: auto;
  padding: 0;
  margin-top: 0.75rem;
}
.btn-quiet:hover { color: var(--ink); background: none; }

.msg { margin-top: 1rem; padding: 0.7rem 0.9rem; border-radius: 8px; font-size: 0.88rem; display: none; }
.msg.show { display: block; }
.msg.error { background: #fbeceb; color: #a13a34; border: 1px solid #f0c9c6; }
.msg.success { background: #ecf6ee; color: #2f6b3f; border: 1px solid #cbe8d2; }

.compose-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
