/* 테마 변수 + 리더 스타일. 원본 globals.css 이식.
   유틸리티 클래스는 Tailwind Play CDN(layout.php 에서 로드)이 처리. */

:root {
  --background: #faf9f7;
  --foreground: #1c1917;
  --card: #ffffff;
  --muted: #78716c;
  --border: #e7e5e4;
  --accent: #6366f1;
}

.dark {
  --background: #12100e;
  --foreground: #e7e5e4;
  --card: #1c1917;
  --muted: #a8a29e;
  --border: #292524;
  --accent: #818cf8;
}

html {
  color-scheme: light;
}
html.dark {
  color-scheme: dark;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 소설 본문 리더 */
.reader-content {
  font-family: "Noto Serif KR", "Nanum Myeongjo", Batang, Georgia, serif;
  line-height: 2;
  word-break: keep-all;
}
.reader-content p {
  margin-bottom: 1.5em;
  text-indent: 1em;
  /* 작성자가 입력한 띄어쓰기·줄바꿈을 그대로 반영 (연속 공백/단일 개행 보존) */
  white-space: pre-wrap;
}
.reader-content p:empty {
  margin-bottom: 0;
}

/* 심플 에디터 본문 입력 — 리더와 비슷한 느낌으로 작성 */
.editor-textarea {
  font-family: "Noto Serif KR", "Nanum Myeongjo", Batang, Georgia, serif;
  line-height: 1.9;
  min-height: 220px;
}
