/* =================================================
   TipTap Editor – EDIT MODE (작성 중)
================================================= */

#tiptap-editor {
  min-height: 260px;
}

#tiptap-editor .ProseMirror {
  min-height: 240px;
  padding: 12px 10px;
  outline: none;

  /* 🔥 줄바꿈 핵심 */
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;

  font-size: 14px;
  line-height: 1.7;
}

/* Placeholder (TipTap 구조 대응) */
#tiptap-editor .ProseMirror p.is-editor-empty:first-child::before {
  content: "여기에 글을 써보세요 ✍️";
  color: #adb5bd;
  float: left;
  height: 0;
  pointer-events: none;
}

/* 모바일 */
@media (max-width: 768px) {
  #tiptap-editor {
    min-height: 220px;
  }

  #tiptap-editor .ProseMirror {
    min-height: 200px;
    font-size: 14px;
  }
}

/* =================================================
   TipTap Content – VIEW MODE (출력)
================================================= */

.tiptap-prose {
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.7;
}

/* 이미지 기본 */
.tiptap-prose img {
  display: block;
  height: auto;
  border-radius: 12px;
  margin: 1.2rem auto;
}

/* 이미지 크기 */
.tiptap-prose img[data-size="small"] {
  max-width: 50%;
}

.tiptap-prose img[data-size="medium"] {
  max-width: 75%;
}

.tiptap-prose img[data-size="large"] {
  max-width: 100%;
}

/* 이미지 정렬 */
.tiptap-prose img[data-align="left"] {
  float: left;
  margin-right: 1rem;
}

.tiptap-prose img[data-align="right"] {
  float: right;
  margin-left: 1rem;
}

.tiptap-prose img[data-align="center"] {
  margin-left: auto;
  margin-right: auto;
  float: none;
}

/* 모바일 보정 */
@media (max-width: 768px) {
  .tiptap-prose img {
    max-width: 100% !important;
    float: none !important;
    margin: 1rem auto !important;
  }
}
