:root {
  --bg: #f7f3ea;
  --card: #fffaf1;
  --ink: #241b13;
  --muted: #6d6258;
  --line: #e6d9c7;
  --accent: #8a4b28;
  --accent-dark: #653319;
  --soft: #efe2d0;
  --danger: #a13a2d;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Pretendard, Apple SD Gothic Neo, Noto Sans KR, sans-serif;
  background: radial-gradient(circle at top left, #fff5df 0, var(--bg) 42%, #eee3d4 100%);
  color: var(--ink);
}

.app { max-width: 960px; margin: 0 auto; padding: 32px 18px 56px; }
.hero { margin-bottom: 22px; }
.eyebrow { color: var(--accent); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 8px; }
h1 { font-size: clamp(28px, 5vw, 48px); line-height: 1.1; margin: 0 0 12px; }
.desc { color: var(--muted); font-size: 17px; margin: 0; }

.panel {
  background: rgba(255,250,241,.9);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  margin: 18px 0;
  box-shadow: 0 18px 40px rgba(67, 45, 25, .08);
}

h2 { margin: 0 0 16px; font-size: 22px; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 8px; font-weight: 700; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  background: #fffdf9;
  color: var(--ink);
  font: inherit;
}
textarea { resize: vertical; }
button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  cursor: pointer;
  justify-self: start;
}
button:hover { background: var(--accent-dark); }
button.secondary {
  color: var(--danger);
  background: transparent;
  border: 1px solid #ddb9ad;
  padding: 9px 13px;
}
button.secondary:hover { background: #fff0ec; }
.note { color: var(--muted); font-size: 14px; margin: 14px 0 0; }

.manse-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.pillar {
  background: var(--soft);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
}
.pillar small { display: block; color: var(--muted); font-weight: 800; margin-bottom: 4px; }
.pillar strong { display: block; font-size: 25px; }
.timestamp { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.posts { display: grid; gap: 14px; }
.post {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: #fffdf8;
}
.post-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.post h3 { margin: 0 0 8px; font-size: 21px; }
.post p { white-space: pre-wrap; line-height: 1.65; margin: 12px 0; }
.meta { color: var(--muted); font-size: 13px; }
.post .manse-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 12px; }
.post .pillar { padding: 10px; }
.post .pillar strong { font-size: 20px; }
.delete { background: transparent; color: var(--danger); padding: 6px 10px; border: 1px solid #e8c4bb; }
.delete:hover { background: #fff0ec; }
.empty { color: var(--muted); text-align: center; padding: 24px; }

@media (max-width: 640px) {
  .manse-grid, .post .manse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { padding: 18px; border-radius: 18px; }
  .section-head { align-items: flex-start; }
}
