/* ============================================================
   Custom Properties
   ============================================================ */

:root {
  --color-text: #111827;
  --color-text-body: #374151;
  --color-text-muted: #9ca3af;
  --color-text-link: #0284c7;
  --color-bg-subtle: #f3f4f6;
  --color-bg-footer: #1f2937;
  --color-border: #d1d5db;
  --color-border-light: #e5e7eb;
}

/* ============================================================
   Reset & Base
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  background: url("/images/background.png") repeat;
  background-color: var(--color-bg-subtle);
  color: var(--color-text);
}

/* ============================================================
   Layout
   ============================================================ */

.site-container {
  max-width: 56rem; /* = Tailwind max-w-4xl = 896px */
  margin: 0 auto;
  background: white;
  min-height: 100vh;
}

.site-content {
  padding: 0 1.25rem;
}

.site-footer {
  background: var(--color-bg-footer);
  color: var(--color-text-muted);
  text-align: center;
  padding: 3rem 1rem;
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0;
}

/* ============================================================
   Logo (MiniLogo)
   ============================================================ */

.site-logo {
  text-decoration: none;
  display: inline-block;
  letter-spacing: -0.025em;
  line-height: 1;
}

.logo-five,
.logo-sixone {
  color: #000;
}

.logo-tee {
  color: var(--color-text-muted);
}

/* ============================================================
   Post List
   ============================================================ */

.post-list {
  padding-bottom: 1rem;
}

.post-card {
  padding-top: 4rem;
}

.post-header {
  text-align: center;
}

/* リストページ・詳細ページで共通のタイトルスタイル */
.post-title {
  font-size: 1.875rem;
  font-weight: normal;
  line-height: 1.2;
  margin: 2rem 0 0;
  text-align: center;
}

.post-title a {
  color: inherit;
  text-decoration: none;
}

.post-title a:hover {
  text-decoration: underline;
}

/* リストページ・詳細ページで共通の日付スタイル */
.post-date {
  color: var(--color-text-muted);
  margin: 2rem 0 0;
  text-align: center;
}

/* 区切り線の共通スタイル */
hr.post-divider,
hr.post-bottom-divider {
  border: none;
  border-top: 1px solid var(--color-border);
}

hr.post-divider {
  margin-top: 3rem;
  margin-bottom: 0;
}

hr.post-bottom-divider {
  margin-top: 4rem;
}

.post-excerpt {
  color: var(--color-text-body);
  line-height: 1.7;
  margin-top: 2rem;
  margin-bottom: 0;
  padding-bottom: 3rem;
}

/* read-more は <a> 要素に直接適用 */
.read-more {
  display: block;
  text-align: right;
  color: var(--color-text-link);
  text-decoration: none;
}

.read-more:hover {
  text-decoration: underline;
}

/* ============================================================
   Pagination
   ============================================================ */

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4rem 0;
}

.pagination a {
  color: var(--color-text-link);
  text-decoration: none;
}

.pagination a:hover {
  text-decoration: underline;
}

.pagination .disabled {
  color: var(--color-text-muted);
}

/* ============================================================
   Post Detail
   ============================================================ */

.post-detail {
  padding-top: 4rem;
}

/* ============================================================
   Prose (Markdown content)
   ============================================================ */

.prose {
  line-height: 1.75;
  color: var(--color-text-body);
  margin-top: 2rem;
  padding-bottom: 3rem;
}

.prose h1 {
  font-size: 2.25em;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 0.8em;
  line-height: 1.1;
  color: var(--color-text);
}

.prose h2 {
  font-size: 1.5em;
  font-weight: normal;
  margin-top: 2em;
  margin-bottom: 0.75em;
  line-height: 1.3;
  color: var(--color-text);
}

.prose h3 {
  font-size: 1.25em;
  font-weight: normal;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.4;
  color: var(--color-text);
}

.prose h4,
.prose h5,
.prose h6 {
  font-weight: normal;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.4;
  color: var(--color-text);
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose a {
  color: var(--color-text-link);
  text-decoration: none;
}

.prose a:hover {
  text-decoration: underline;
}

.prose strong {
  font-weight: 700;
  color: var(--color-text);
}

.prose ul {
  list-style: disc inside;
  padding-left: 0;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose ol {
  list-style: decimal inside;
  padding-left: 0;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose li p {
  display: inline;
  margin: 0;
}

.prose blockquote {
  border-left: 5px solid var(--color-border);
  font-style: italic;
  margin: 1.5em 0;
  padding-left: 1em;
  color: #6b7280;
}

.prose blockquote p {
  margin: 0;
}

.prose code {
  background: var(--color-bg-subtle);
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 80%;
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
}

.prose pre {
  background: var(--color-bg-subtle);
  padding: 0.75rem;
  border-radius: 6px;
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 1.25em 0;
}

.prose pre code {
  background: none;
  padding: 0;
  font-size: 0.875em;
  border-radius: 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  margin: 1.5em auto;
  display: block;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25em 0;
  font-size: 0.875em;
}

.prose th,
.prose td {
  border: 1px solid var(--color-border-light);
  padding: 8px 12px;
  text-align: left;
}

.prose th {
  background: #f9fafb;
  font-weight: 600;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--color-border-light);
  margin: 2em 0;
}

.prose del {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

/* ============================================================
   YouTube embed
   ============================================================ */

.youtube {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 1.5em 0;
}

.youtube iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
