﻿@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600&display=swap');

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

body {
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic UI', Meiryo, sans-serif;
  background: #f5f5f0;
  color: #333;
  line-height: 1.8;
  padding-bottom: 4rem;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Header */
header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0d8;
}

.breadcrumb {
  font-size: 0.78rem;
  color: #aaa;
  margin-bottom: 0.4rem;
}

.breadcrumb a { color: #aaa; text-decoration: none; }
.breadcrumb a:hover { color: #555; }

h1 {
  font-size: 1.35rem;
  font-weight: 600;
  color: #444;
}

/* TOC */
.toc {
  background: #fff;
  border: 1px solid #e0e0d8;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
}

.toc-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #bbb;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.toc ol {
  padding-left: 1.4rem;
  font-size: 0.9rem;
}

.toc li { margin: 0.25rem 0; }
.toc a { color: #555; text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* Content sections */
.section {
  background: #fff;
  border: 1px solid #e0e0d8;
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f0f0e8;
}

.section p {
  font-size: 0.95rem;
  line-height: 1.85;
  margin-bottom: 0.75rem;
}

.section p:last-child { margin-bottom: 0; }

pre {
  font-family: 'BIZ UDGothic', 'Yu Gothic', 'MS Gothic', monospace;
  font-size: 0.93rem;
  line-height: 1.75;
  background: #f8f8f5;
  border-radius: 4px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
  margin: 0.8rem 0;
}

@media (max-width: 640px) {
  .container {
    padding: 1.25rem 1rem;
  }
  .section {
    padding: 1rem 1.2rem;
  }
  pre {
    font-size: 0.8rem;
    padding: 0.75rem 0.9rem;
  }
  .page-nav {
    flex-direction: column;
  }
  .page-nav a {
    text-align: center;
  }
}

/* Page navigation */
.page-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0d8;
  font-size: 0.83rem;
}

.page-nav a {
  color: #666;
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border: 1px solid #e0e0d8;
  border-radius: 6px;
  background: #fff;
  flex: 1;
  text-align: center;
  line-height: 1.4;
}

.page-nav a:hover { background: #f5f5f0; }

/* Footer */
.author-footer {
  margin-top: 1.5rem;
  font-size: 0.74rem;
  color: #ccc;
}
