/* Pretendard 폰트는 home-v25.css(홈페이지 공용 스타일)에서 이미 로드됨 - 중복 로드 시 미세한 폭 차이로 헤더가 어긋나는 문제 있어 제거 */

:root {
  --bg: #F2F1EF;
  --card: #FFFFFF;
  --ink: #2B2926;
  --ink-soft: #8A8580;
  --gold: #A9884F;
  --gold-dark: #8C6E33;
  --gold-soft: #EFE3C8;
  --line: #E3E0DA;
  --radius: 6px;
  --shadow: 0 8px 24px rgba(43, 42, 38, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== 공용 헤더 ===== */
header.site {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
header.site .logo {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
@media (max-width: 480px) {
  header.site .logo { font-size: 20px; }
}

/* ===== 공용 마무리(WHY MISOAN) ===== */
.why-misoan {
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 100px 24px;
}
.why-misoan .eyebrow {
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 16px;
}
.why-misoan h2 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.5;
  max-width: 520px;
  margin: 0 auto 32px;
}
.why-misoan .btn-outline {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  padding: 12px 28px;
  border-radius: 99px;
  text-decoration: none;
}
@media (max-width: 480px) {
  .why-misoan { padding: 70px 20px; }
  .why-misoan h2 { font-size: 20px; }
}

.wrap { max-width: 780px; margin: 0 auto; padding: 40px 20px 80px; }
.wrap-wide { padding-top: 165px; }

.brand-eyebrow {
  font-size: 13px; letter-spacing: 0.12em; color: var(--gold-dark);
  font-weight: 600; margin-bottom: 8px;
}

h1.page-title { font-size: 26px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.01em; }

.top-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
}

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 20px; border-radius: 4px; background: var(--ink);
  color: #fff; font-weight: 500; font-size: 14px; text-decoration: none;
  border: none; cursor: pointer; transition: opacity 0.2s ease;
}
.btn:hover { opacity: .85; }

.btn-ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--card); color: var(--ink); }

.btn-danger { background: #B0453F; }
.btn-danger:hover { opacity: .85; }

.wrap-wide { max-width: 1100px; }

.board-header { text-align: center; margin-bottom: 8px; }
.board-header .page-title { font-size: 30px; margin-bottom: 0; }
.board-header .title-row { margin-bottom: 36px; }
.write-btn-row { margin: 14px 0 20px; }

/* 검색 */
.search-row { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 20px; }
.search-row select {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px;
  font-family: inherit; font-size: 14px; background: var(--card);
}
.search-row input[type="text"] {
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 4px;
  font-family: inherit; font-size: 14px; width: 200px; background: var(--card);
}
.search-btn {
  border: none; background: var(--ink); color: #fff; border-radius: 4px;
  padding: 0 16px; cursor: pointer; font-size: 16px;
}
.search-btn:hover { opacity: .85; }

/* 표 형태 게시판 */
table.board-table { width: 100%; border-collapse: collapse; }
table.board-table thead th {
  border-bottom: 1px solid var(--ink); padding: 0 10px 12px; font-size: 13px;
  font-weight: 500; color: var(--ink-soft); text-align: center;
}
table.board-table td { border-bottom: 1px solid var(--line); padding: 16px 10px; font-size: 15px; }
table.board-table .col-no { text-align: center; width: 60px; color: var(--ink-soft); font-size: 14px; }
table.board-table .col-writer, table.board-table .col-date { text-align: center; width: 110px; color: var(--ink-soft); font-size: 14px; }
table.board-table .col-title a { color: var(--ink); text-decoration: none; font-weight: 500; }
table.board-table .col-title a:hover { color: var(--gold-dark); }
table.board-table tr:hover td { background: #FBFAF8; }
.pinned-row td { background: var(--gold-soft); }
.pinned-row:hover td { background: var(--gold-soft); }
.pin-badge {
  display: inline-block; color: #fff; background: var(--ink);
  font-weight: 700; font-size: 12px; border-radius: 3px; padding: 2px 6px; margin-right: 6px;
}
.row-tag {
  display: inline-block; width: 62px; text-align: center;
  color: var(--gold-dark); font-weight: 500; font-size: 12px;
  border: 1px solid var(--gold); border-radius: 99px; padding: 2px 0; margin-right: 8px;
}

@media (max-width: 640px) {
  table.board-table .col-writer, table.board-table .col-no { display: none; }
  table.board-table .col-date { width: 64px; font-size: 12.5px; }
  table.board-table td { padding: 14px 6px; }
  table.board-table .col-title a { font-size: 13.5px; }
  table.board-table .row-tag { font-size: 11px; padding: 2px 8px; margin-right: 6px; }
  .search-row input[type="text"] { width: 120px; }
}
.tabs {
  position: relative;
  display: flex; gap: 32px; margin-bottom: 20px; flex-wrap: wrap;
  justify-content: center;
  border-bottom: 1px solid var(--line); padding-bottom: 0;
}
.tabs a {
  padding: 0 4px 14px; font-size: 15px; font-weight: 500;
  color: var(--ink-soft); text-decoration: none; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color .2s;
}
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.title-row {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.tabs-write {
  font-size: 13px !important; font-weight: 500 !important;
  color: var(--ink-soft) !important; padding: 2px 4px !important;
  border-bottom: none !important; margin-bottom: 0 !important;
  text-decoration: none;
}
.tabs-write:hover { color: var(--gold-dark) !important; }
.tabs-write-desktop { position: absolute; right: 4px; top: 2px; }
.tabs-write-mobile { display: none; }
@media (max-width: 640px) {
  .tabs-write-desktop { display: none; }
  .tabs-write-mobile {
    display: inline-block;
    position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  }
}

.tag {
  display: inline-block; font-size: 12px; font-weight: 500; color: var(--gold-dark);
  background: var(--gold-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 6px;
}

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--ink-soft);
  background: var(--card); border-radius: var(--radius); border: 1px dashed var(--line);
}

/* 폼 */
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--ink-soft); }
.field input[type="text"], .field input[type="password"], .field select, .field textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 4px;
  font-family: inherit; font-size: 15px; background: var(--card); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field textarea { resize: vertical; min-height: 180px; }

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

.alert { padding: 12px 16px; border-radius: 4px; font-size: 13px; margin-bottom: 20px; }
.alert-error { background: #FBEAEA; color: #A33; border: 1px solid #F0C7C7; }
.alert-success { background: var(--gold-soft); color: var(--gold-dark); border: 1px solid var(--gold); }

.post-meta { font-size: 13.5px; color: var(--ink-soft); margin: 4px 0 0; display: flex; gap: 16px; }

.prev-next {
  margin-top: 40px; border-top: 1px solid var(--line);
}
.prev-next a, .prev-next span.disabled {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 4px; font-size: 14.5px; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.prev-next a:last-child, .prev-next span.disabled:last-child { border-bottom: none; }
.prev-next a:hover { color: var(--gold-dark); }
.prev-next .pn-label { width: 60px; flex-shrink: 0; font-size: 13px; color: var(--ink-soft); font-weight: 500; }

.detail-card { padding: 0; }
.detail-content { font-size: 15.5px; line-height: 1.8; white-space: pre-wrap; margin: 32px 0 0; padding-top: 32px; border-top: 1px solid var(--ink); }
.detail-content img { max-width: 100%; border-radius: 4px; margin: 8px 0 24px; display: block; }

/* 관리자 목록 테이블 */
table.admin-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.admin-table th, table.admin-table td { padding: 12px 14px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--line); }
table.admin-table th { background: var(--gold-soft); color: var(--gold-dark); font-weight: 600; }
table.admin-table td.actions { white-space: nowrap; }
table.admin-table a { color: var(--gold-dark); text-decoration: none; font-weight: 600; margin-right: 10px; }

.login-box { max-width: 380px; margin: 60px auto; text-align: center; }

@media (max-width: 480px) {
  .wrap { padding: 28px 16px 60px; }
  .wrap-wide { padding-top: 135px; }
  h1.page-title { font-size: 22px; }
  table.admin-table { font-size: 12px; }
}
