:root {
  --board-ink: #1f2937;
  --board-muted: #667085;
  --board-line: #e4e7ec;
  --board-soft: #f7f9fc;
  --board-primary: #246b4b;
  --board-primary-dark: #185237;
  --board-danger: #b42318;
  --board-notice: #fff7e6;
}

* { box-sizing: border-box; }
.board-page [hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

body.board-page {
  margin: 0;
  background: #f4f7f5;
  color: var(--board-ink);
  font-family: Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

.board-shell { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 64px; }
.board-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.board-header h1 { margin: 0; font-size: clamp(25px, 4vw, 34px); letter-spacing: -.04em; }
.board-home { color: var(--board-primary); font-weight: 700; text-decoration: none; }
.board-home:hover { text-decoration: underline; }

.board-card {
  background: #fff;
  border: 1px solid var(--board-line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .055);
  padding: 24px;
}

.board-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 22px; }
.board-tab {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--board-line);
  border-radius: 12px;
  color: #344054;
  background: #fff;
  font-weight: 750;
  text-decoration: none;
}
.board-tab:hover { border-color: #8eb9a3; background: #f7fbf9; }
.board-tab[aria-current="page"] { color: #fff; border-color: var(--board-primary); background: var(--board-primary); }

.board-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 18px; }
.board-section-head h2 { margin: 0 0 6px; font-size: 23px; }
.board-intro { margin: 0; color: var(--board-muted); line-height: 1.6; }
.board-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.board-btn {
  appearance: none;
  border: 1px solid #cdd5df;
  border-radius: 10px;
  background: #fff;
  color: #344054;
  min-height: 42px;
  padding: 9px 15px;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.board-btn:hover { background: #f8fafc; }
.board-btn:disabled { cursor: wait; opacity: .6; }
.board-btn--primary { color: #fff; background: var(--board-primary); border-color: var(--board-primary); }
.board-btn--primary:hover { background: var(--board-primary-dark); }
.board-btn--danger { color: var(--board-danger); border-color: #f0b9b3; }
.board-btn--small { min-height: 34px; padding: 6px 10px; font-size: 13px; }

.board-search { display: flex; gap: 8px; margin: 0 0 16px; }
.board-search input,
.board-field input,
.board-field textarea,
.board-status-select {
  width: 100%;
  border: 1px solid #cdd5df;
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--board-ink);
  background: #fff;
  font: inherit;
}
.board-search input:focus,
.board-field input:focus,
.board-field textarea:focus,
.board-status-select:focus { outline: 3px solid rgba(36, 107, 75, .16); border-color: var(--board-primary); }
.board-search input { flex: 1; min-width: 0; }

.board-table-wrap { overflow-x: auto; border: 1px solid var(--board-line); border-radius: 12px; }
.board-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.board-table th { background: var(--board-soft); color: #475467; font-size: 13px; }
.board-table th, .board-table td { padding: 13px 12px; text-align: center; border-bottom: 1px solid var(--board-line); }
.board-table tbody tr:last-child td { border-bottom: 0; }
.board-table .board-title-cell { text-align: left; width: auto; }
.board-title-link { color: var(--board-ink); font-weight: 720; text-decoration: none; word-break: break-word; }
.board-title-link:hover { color: var(--board-primary); text-decoration: underline; }
.board-author { display: block; margin-top: 4px; color: var(--board-muted); font-size: 12px; }
.board-col-comments { width: 84px; }
.board-col-views { width: 86px; }
.board-col-date { width: 132px; }
.board-col-status { width: 100px; }
.board-empty { padding: 42px 16px !important; color: var(--board-muted); }

.board-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 800; }
.board-badge--pin { margin-right: 6px; background: #ffedd5; color: #9a3412; }
.board-badge--open { background: #eff4ff; color: #3538cd; }
.board-badge--answered { background: #ecfdf3; color: #027a48; }

.board-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.board-page-link { min-width: 38px; min-height: 38px; display: grid; place-items: center; border: 1px solid var(--board-line); border-radius: 9px; color: #344054; text-decoration: none; font-weight: 700; }
.board-page-link[aria-current="page"] { color: #fff; background: var(--board-primary); border-color: var(--board-primary); }

.board-message { min-height: 24px; margin: 12px 0 0; color: var(--board-muted); font-size: 14px; }
.board-message.is-error { color: var(--board-danger); }

.board-form { display: grid; gap: 18px; }
.board-field label { display: block; margin-bottom: 7px; font-weight: 800; }
.board-field textarea { min-height: 320px; resize: vertical; line-height: 1.7; }
.board-counter { margin-top: 5px; color: var(--board-muted); text-align: right; font-size: 12px; }
.board-warning { padding: 13px 15px; border: 1px solid #fedf89; border-radius: 10px; background: #fffaeb; color: #93370d; line-height: 1.55; }
.board-checkbox { display: flex; align-items: center; gap: 8px; font-weight: 700; }

.board-post-title { margin: 0 0 10px; font-size: clamp(23px, 4vw, 32px); word-break: break-word; }
.board-post-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--board-muted); font-size: 13px; }
.board-post-content { min-height: 180px; margin: 24px 0; padding: 22px 0; border-top: 1px solid var(--board-line); border-bottom: 1px solid var(--board-line); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.board-manage { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.board-status-select { width: auto; min-width: 130px; }

.board-comments { margin-top: 28px; }
.board-comments h2 { font-size: 20px; }
.board-comment-list { display: grid; gap: 10px; margin: 14px 0; }
.board-comment { border: 1px solid var(--board-line); border-radius: 12px; padding: 14px; }
.board-comment-head { display: flex; justify-content: space-between; gap: 10px; color: var(--board-muted); font-size: 12px; }
.board-comment-content { margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.board-comment-actions { display: flex; gap: 6px; margin-top: 10px; }
.board-comment-edit-form { display: grid; gap: 8px; margin-top: 10px; }
.board-comment-edit-form textarea { min-height: 100px; }
.board-comment-edit-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.board-comment-form { display: grid; gap: 8px; }
.board-comment-form textarea { min-height: 100px; }

@media (max-width: 720px) {
  .board-shell { width: min(100% - 20px, 1080px); padding-top: 18px; }
  .board-card { padding: 16px; border-radius: 14px; }
  .board-header { align-items: flex-start; }
  .board-tabs { gap: 5px; }
  .board-tab { min-height: 43px; padding: 7px 5px; font-size: 13px; text-align: center; }
  .board-section-head { align-items: stretch; flex-direction: column; }
  .board-search { flex-wrap: wrap; }
  .board-search input { flex-basis: 100%; }
  .board-table-wrap { overflow: visible; border: 0; }
  .board-table, .board-table tbody { display: block; }
  .board-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .board-table tr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; padding: 14px; border: 1px solid var(--board-line); border-radius: 12px; background: #fff; }
  .board-table td { display: block; padding: 0; border: 0; text-align: left; color: var(--board-muted); font-size: 12px; }
  .board-table td::before { content: attr(data-label) " "; font-weight: 800; color: #475467; }
  .board-table .board-title-cell { grid-column: 1 / -1; font-size: 15px; }
  .board-table .board-title-cell::before { content: ""; }
  .board-table .board-empty { grid-column: 1 / -1; text-align: center; }
  .board-col-comments, .board-col-views, .board-col-date, .board-col-status { width: auto; }
  .board-field textarea { min-height: 260px; }
}
