/* Base */
body {
  font-family: 'Noto Sans SC', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

/* Loading dots animation */
.loading-dots span {
  animation: blink 1.4s infinite;
  font-weight: bold;
  font-size: 1.2em;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 20% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

/* Markdown prose overrides */
.prose {
  max-width: none;
}
.prose p {
  margin: 0.4em 0;
}
.prose blockquote {
  border-left: 3px solid #6366f1;
  padding: 0.4em 0.8em;
  margin: 0.5em 0;
  background: #f5f3ff;
  border-radius: 0 0.5rem 0.5rem 0;
}
.prose strong {
  font-weight: 600;
}
.prose code {
  background: #f3f4f6;
  padding: 0.15em 0.3em;
  border-radius: 0.25rem;
  font-size: 0.9em;
}
.prose ul, .prose ol {
  padding-left: 1.2em;
  margin: 0.3em 0;
}

/* Textarea auto-height */
textarea {
  transition: height 0.1s ease;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
textarea::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Mobile safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  footer {
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }
  main {
    padding-bottom: calc(9rem + env(safe-area-inset-bottom));
  }
}

textarea.hide-cursor {
  cursor: none;
}

/* TTS play button */
.tts-btn {
  display: inline-block;
  cursor: pointer;
  font-size: 0.85em;
  vertical-align: middle;
  padding: 0 2px;
  border: none;
  background: none;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.tts-btn:hover {
  opacity: 1;
}

::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 2px;
}
