/* ── 레이아웃 ── */
/* ─── Viewport 전체 높이를 활용해 푸터를 아래에 고정 ─── */
html, body {
  height: 100%;
  margin: 0;
}
body {
  display: flex;
  flex-direction: column;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  background: #fff;
  color: #333;
  margin: 0;
  padding: 0;
}
.review-content {
  width: 90%;
  max-width: 800px;
  margin: 100px auto 40px;
}
.top-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

/* ── 버튼 ── */
.btn {
  font-family: inherit;
  border: none;
  cursor: pointer;
}
.write-btn {
  background: #2a83ff;
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background 0.2s;
}
.write-btn:hover {
  background: #0067e2;
}

/* ── 카드형 미리보기 ── */
.post-list {
  display: flex;
  flex-direction: column;
}
.post-list hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 8px 0;
}

/* ── 한 줄 아이템 ── */
.post-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
}
.post-content {
  flex: 1;
  padding-right: 12px;
}
/* ── 전체 레이아웃 ── */
.review-content {
  width: 90%;
  max-width: 800px;
  margin: 100px auto 40px;
  flex: 1;
}
.top-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

/* ── 포스트 리스트 ── */
.post-list {
  display: flex;
  flex-direction: column;
}
.post-list hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 8px 0;
}

/* ── 한 줄 아이템 ── */
.post-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
}
.post-content {
  flex: 1;
  padding-right: 12px;
}
.post-title {
  font-size: 1.2rem;
  margin: 0 0 4px;
  color: #222;
  line-height: 1.3;
}
.post-meta {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 6px;
}
.post-summary {
  font-size: 1rem;
  color: #555;
  line-height: 1.4;
  margin: 0;
  /* 두 줄 넘으면 말줄임 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 썸네일 ── */
.post-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 80px;
  overflow: hidden;
  border-radius: 4px;
}
.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── 버튼 ── */
.btn {
  font-family: inherit;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 4px;
}
.write-btn {
  background: #2a83ff;
  color: #fff;
}
.write-btn:hover {
  background: #0067e2;
}

/* ── 반응형 ── */
@media (max-width: 600px) {
  .post-item {
    flex-direction: column;
  }
  .post-thumb {
    width: 100%;
    height: 160px;
    margin-top: 8px;
  }
}

.post-item:hover {
  transform: translateY(-2px);
}
.post-info {
  flex: 1;
  padding-right: 16px;
  display: flex;
  flex-direction: column;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.user {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.username { font-weight: 500; }
.time {
  font-size: 0.875rem;
  color: #777;
}
.btn.neighbor {
  margin-left: auto;
  font-size: 0.875rem;
  padding: 4px 8px;
  border: 1px solid #2a83ff;
  background: #fff;
  color: #2a83ff;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.btn.neighbor:hover {
  background: #2a83ff;
  color: #fff;
}

/* ── 글쓰기/글보기 폼 ── */
.form-container {
  width: 90%;
  max-width: 600px;
  margin: 100px auto 40px;
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
}
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.detail-container {
  width: 90%;
  max-width: 800px;
  margin: 100px auto 40px;
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.detail-title {
  font-size: 1.75rem;
  margin-bottom: 12px;
  color: #2a83ff;
}
.detail-meta {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 16px;
}
.detail-content {
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 1rem;
}
/* — 기존 .form-container 가 있으면 무시하고 전체 폭 사용 — */
.write-content {
  width: 90%;
  max-width: none;       /* 제한 해제 */
  margin: 100px auto 40px;
  padding: 0;
  background: none;
  box-shadow: none;
}

/* 제목 스타일 (기존 .detail-title 재활용) */
.detail-title {
  font-size: 1.75rem;
  margin-bottom: 24px;
  color: #2a83ff;
}

/* 입력란을 넓고 높게 */
.form-group input,
.form-group textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

/* textarea 높이 키우기 */
.form-group textarea {
  min-height: 400px;     /* 원하는 높이로 조정 */
  resize: vertical;
}

/* 라벨과 입력란 사이 여백 */
.form-group {
  margin-bottom: 24px;
}

/* 버튼 그룹은 우측 정렬 */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* 등록 버튼 강조 */
.write-btn {
  background: #2a83ff;
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
}
.write-btn:hover {
  background: #0067e2;
}
/* ── 에디터 툴바 ── */
.editor-toolbar {
  margin-bottom: 8px;
}
.editor-toolbar button {
  border: 1px solid #ccc;
  background: #fafafa;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}
.editor-toolbar button:hover {
  background: #eee;
}

/* ── 내용 에디터 ── */
.editor {
  min-height: 400px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 12px;
  outline: none;
  background: #fff;
}
.editor:empty:before {
  content: attr(data-placeholder);
  color: #aaa;
}
.write-content .editor img {
  display: block !important;
  width: 40% !important;
  height: auto !important;
  margin: 16px 0 !important;
}
/* …기존 스타일… */

/* ── 리사이저블 이미지 래퍼 ── */
.resizable-image {
  display: inline-block;
  resize: both;
  overflow: auto;
  border: 1px dashed #aaa;
}
.resizable-image img {
  display: block;
  width: 100%;
  height: auto;
}
