:root {
  --color-primary: #3d7a5c;
  --color-primary-dark: #2c5c44;
  --color-bg: #f7f9f6;
  --color-card: #ffffff;
  --color-border: #e2e8e0;
  --color-text: #2b2f2c;
  --color-text-muted: #6b7570;
  --color-accent: #f0ead2;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* 헤더 */
.site-header {
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-decoration: none;
  background: none;
  border: none;
}

.main-nav {
  display: flex;
  gap: 6px;
}

.nav-link {
  background: none;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: var(--color-accent);
}

.nav-link.active {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

/* 레이아웃 */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 홈 */
.hero {
  text-align: center;
  padding: 56px 20px;
  background: linear-gradient(180deg, var(--color-accent), transparent);
  border-radius: var(--radius);
  margin-bottom: 32px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 2rem;
  color: var(--color-primary-dark);
}

.hero p {
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.info-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.info-card h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.info-card p {
  color: var(--color-text-muted);
  margin-bottom: 0;
  font-size: 0.92rem;
}

/* 버튼 */
.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.1s, opacity 0.15s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  background: var(--color-accent);
}

.btn-danger-outline {
  background: transparent;
  color: #b3413a;
  border: 1px solid #e3b6b1;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.85rem;
  margin-top: 16px;
}

.btn-danger-outline:hover {
  background: #fbeceb;
}

.btn-back {
  margin-bottom: 16px;
}

/* 게시판 */
.board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.board-header h2 {
  margin: 0;
  color: var(--color-primary-dark);
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-item {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.1s;
}

.post-item:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.post-item-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.post-item-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: flex;
  gap: 10px;
}

.empty-message {
  text-align: center;
  color: var(--color-text-muted);
  padding: 40px 0;
}

/* 폼 */
.post-form,
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
}

.post-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.post-form input,
.post-form textarea,
.comment-form input {
  font-family: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  resize: vertical;
}

.post-form input:focus,
.post-form textarea:focus,
.comment-form input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* 상세 */
.post-detail {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.post-detail h2 {
  margin-top: 0;
  color: var(--color-primary-dark);
}

.post-meta {
  display: flex;
  gap: 12px;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.post-content {
  white-space: pre-wrap;
  line-height: 1.8;
}

/* 댓글 */
.comments h3 {
  color: var(--color-primary-dark);
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-item {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 14px;
}

.comment-item-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
  display: flex;
  gap: 8px;
}

.comment-form {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
}

.comment-form input[type="text"]#comment-author {
  flex: 0 0 120px;
}

.comment-form input[type="text"]#comment-content {
  flex: 1 1 200px;
}

/* 푸터 */
.site-footer {
  text-align: center;
  padding: 24px 20px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--color-border);
}

.site-footer p {
  margin: 4px 0;
}

/* 반응형 */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .board-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .comment-form {
    flex-direction: column;
    align-items: stretch;
  }

  .comment-form input[type="text"]#comment-author {
    flex: 1 1 auto;
  }
}
