/* ==============================================================
   すごいメモ帳 - スタイルシート (public/style.css)
   ============================================================== */

:root {
  --bg-base: #FDFBF7;
  --text-main: #292524; /* stone-800 */
}

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(168, 162, 158, 0.4);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 113, 108, 0.6);
}

/* 2行省略 (line-clamp-2) */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Markdown レンダリングスタイル */
.markdown-body input[type="checkbox"] {
  cursor: pointer;
  margin-right: 0.5rem;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: #d97706; /* amber-600 */
  border-radius: 0.25rem;
  vertical-align: middle;
}

.markdown-body ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.markdown-body ul.contains-task-list {
  list-style-type: none;
  padding-left: 0.25rem;
}

.markdown-body li {
  margin-top: 0.125rem;
  margin-bottom: 0.125rem;
}

.markdown-body h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.markdown-body h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 0.875rem;
  margin-bottom: 0.375rem;
}

.markdown-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

.markdown-body p {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
  line-height: 1.65;
}

.markdown-body blockquote {
  border-left: 3px solid #d6d3d1;
  padding-left: 0.75rem;
  color: #78716c;
  margin: 0.5rem 0;
}

.markdown-body pre {
  background: #f5f5f4;
  padding: 0.75rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-size: 0.875rem;
  margin: 0.5rem 0;
}

.markdown-body code {
  background: #f5f5f4;
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

/* SortableJS ドラッグ中スタイル */
.sortable-ghost {
  opacity: 0.4;
  background-color: #fef3c7 !important; /* amber-100 */
}
.sortable-chosen {
  background-color: #fef9c3 !important;
}

/* アニメーション */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}
.animate-fade-in {
  animation: fadeIn 0.15s ease-out forwards;
}

/* スプラッシュ画面スタイル */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #FDFBF7;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  opacity: 1;
  transition: opacity 0.6s ease;
}

#splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

#splash-logo {
  max-width: 80%;
  max-height: 40%;
  width: auto;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* 入力カーソル（キャレット）の視認性向上 */
#editor-title-input,
#editor-content-input {
  caret-color: #d97706 !important; /* amber-600 */
}

/* スマホ表示時の標準フォントサイズ・行間の拡大調整 (視認性を大幅向上) */
@media (max-width: 768px) {
  #editor-content-input,
  #viewer-content,
  .markdown-body {
    font-size: 19px !important;
    line-height: 1.85 !important;
  }
  #editor-title-input,
  #viewer-title {
    font-size: 1.65rem !important;
    line-height: 1.35 !important;
  }
}

