body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f5f3;
  color: #42584b;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
}

.narrow {
  max-width: 760px;
}

.page-title-wrap {
  text-align: center;
  margin: 30px 0;
}

.page-title {
  font-size: 42px;
  margin: 0;
  color: #506d60;
}

.page-desc {
  margin-top: 10px;
  color: #7c8f83;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.top-actions-right {
  justify-content: flex-end;
}

.inline-form {
  display: inline;
}

.admin-status {
  padding: 10px 14px;
  border-radius: 12px;
  background: #edf3ee;
  border: 1px solid #d6e1d8;
  font-weight: bold;
  color: #516c5c;
}

.list-card,
.detail-card,
.form-card,
.login-card,
.comment-card,
.reply-card {
  background: #fff;
  border: 1px solid #d9e1db;
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 20px;
}

.list-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.list-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  justify-content: flex-end;
}

.search-form {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  max-width: 540px;
}

.search-input {
  margin: 0;
  flex: 1;
}

.search-btn,
.write-btn {
  white-space: nowrap;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.board-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.board-table th,
.board-table td {
  border-bottom: 1px solid #e5ebe6;
  padding: 14px 10px;
  text-align: center;
  vertical-align: top;
}

.board-table th {
  font-size: 16px;
}

.title-cell {
  text-align: left;
  word-break: break-word;
}

.title-link {
  color: #31473a;
  text-decoration: none;
  font-weight: bold;
}

.title-link:hover {
  text-decoration: none;
  color: #31473a;
}

.comment-count {
  margin-left: 6px;
  color: #7e9084;
}

.empty-cell,
.empty-box {
  text-align: center;
  color: #87958c;
  padding: 20px;
}

.detail-header-line {
  border-top: 2px solid #c7d3ca;
  margin-bottom: 26px;
}

.detail-title {
  font-size: 28px;
  margin-bottom: 20px;
}

.detail-meta,
.comment-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: #61766a;
  margin-bottom: 16px;
}

.detail-content {
  min-height: 220px;
  line-height: 1.8;
  color: #31473a;
}

.bottom-btns {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  background: #879a89;
  color: white;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.btn:hover {
  opacity: 0.95;
}

.cancel {
  background: #b0b0b0;
}

.logout {
  background: #cc7373;
}

.delete {
  background: #9b7d7d;
}

input,
textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  margin: 8px 0 14px 0;
  border: 1px solid #d6dfd8;
  border-radius: 12px;
  font-size: 16px;
}

#editor {
  background: white;
  min-height: 240px;
  margin-top: 8px;
}

.ql-toolbar.ql-snow {
  border-radius: 12px 12px 0 0;
}

.ql-container.ql-snow {
  min-height: 220px;
  border-radius: 0 0 12px 12px;
}

.error-box {
  background: #ffe5e5;
  color: #b65252;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.success-box {
  background: #e8f7ea;
  color: #39734a;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.login-card h2 {
  margin-top: 0;
  font-size: 26px;
}

.comment-section {
  margin-top: 30px;
}

.comment-form textarea,
.reply-form textarea {
  min-height: 100px;
}

.comment-card {
  margin-top: 14px;
}

.comment-body {
  color: #33493d;
  line-height: 1.7;
}

.reply-list {
  margin-top: 14px;
  padding-left: 20px;
}

.reply-card {
  background: #f8faf8;
  margin-top: 10px;
}

.reply-title-line {
  margin-bottom: 8px;
  color: #61766a;
}

.new-badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  font-weight: bold;
  color: #cc7373;
}

.reply-preview-list {
  margin-top: 10px;
}

.reply-preview-item {
  margin-top: 6px;
  color: #61766a;
  line-height: 1.6;
  font-size: 14px;
  word-break: break-word;
}

.reply-preview-prefix {
  margin-right: 6px;
  color: #7e9084;
  font-weight: bold;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.page-link {
  display: inline-block;
  min-width: 18px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #d6dfd8;
  background: #fff;
  color: #506d60;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
}

.page-link.active {
  background: #879a89;
  color: white;
  border-color: #879a89;
}

@media (max-width: 700px) {
  .page {
    padding: 14px;
  }

  .page-title {
    font-size: 30px;
  }

  .top-actions,
  .bottom-btns,
  .list-top,
  .list-top-actions,
  .search-form,
  .pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .search-form {
    max-width: 100%;
  }

  .search-btn,
  .write-btn,
  .page-link,
  .btn {
    text-align: center;
  }

  .board-table {
    min-width: 560px;
  }

  .board-table th,
  .board-table td {
    font-size: 14px;
    padding: 10px 6px;
  }

  .reply-preview-item {
    font-size: 13px;
  }

  .list-card,
  .detail-card,
  .form-card,
  .login-card,
  .comment-card,
  .reply-card {
    padding: 18px;
  }
}