/* A2Ring Atelier - Light/Dark 테마 토큰 및 자동 명도 보정 텍스트 스타일 */

#themeScope[data-theme="light"] {
  --background: #f8fafc;
  --card: #ffffff;
  --sidebar: #f1f5f9;
  --border: #e2e8f0;
  --card-border: #e2e8f0;
  --foreground: #0f172a;
  --muted-foreground: #64748b;
  --primary: #2563eb;
  --primary-foreground: #ffffff;
  --secondary: #e2e8f0;
  --secondary-foreground: #1e293b;
  --link: #2563eb;
  --success: #15803d;
  --warning: #d97706;
  --error: #dc2626;

  /* 화이트모드 가독성 최적화 시맨틱 글자색 */
  --tone-red: #dc2626;
  --tone-blue: #2563eb;
  --tone-green: #15803d;
  --tone-amber: #b45309;
  --tone-purple: #7c3aed;
  --tone-muted: #52525b;
}

#themeScope[data-theme="dark"] {
  --background: #0f1117;
  --card: #181b24;
  --sidebar: #13161f;
  --border: #2a2f3d;
  --card-border: #262b38;
  --foreground: #f1f5f9;
  --muted-foreground: #94a3b8;
  --primary: #3b82f6;
  --primary-foreground: #ffffff;
  --secondary: #262b38;
  --secondary-foreground: #e2e8f0;
  --link: #60a5fa;
  --success: #4ade80;
  --warning: #fbbf24;
  --error: #f87171;

  /* 다크모드 가독성 최적화 시맨틱 글자색 */
  --tone-red: #f87171;
  --tone-blue: #60a5fa;
  --tone-green: #4ade80;
  --tone-amber: #fbbf24;
  --tone-purple: #c084fc;
  --tone-muted: #a1a1aa;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

/* 방문자의 화이트/다크 모드에 따라 자동 보정되는 본문 글자색 */
.tone-default { color: var(--foreground); }
.tone-red { color: var(--tone-red); }
.tone-blue { color: var(--tone-blue); }
.tone-green { color: var(--tone-green); }
.tone-amber { color: var(--tone-amber); }
.tone-purple { color: var(--tone-purple); }
.tone-muted { color: var(--tone-muted); }

/* 직관적인 본문 글자 크기 단계 */
.tx-sm { font-size: 12px; line-height: 1.6; }
.tx-md { font-size: 14px; line-height: 1.75; }
.tx-lg { font-size: 17px; line-height: 1.65; }
.tx-xl { font-size: 21px; line-height: 1.5; font-weight: 700; }

/* 본문 가독성 보조 스타일 */
.prose-body p {
  margin: 0.65rem 0;
  word-break: keep-all;
}
.prose-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}
.prose-body img {
  max-width: 100%;
  border-radius: 0.5rem;
}

/* 에디터 플레이스홀더 */
#edRichBody:empty:before {
  content: attr(data-placeholder);
  color: var(--muted-foreground);
  pointer-events: none;
}
