/* === リセット・ベース === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-family);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* === コンテナ === */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
}

/* === ヘッダー === */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  color: #fff;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.header_logo {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.header_menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
}

.header_menu span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav {
  display: flex;
  gap: 4px;
}

.nav_link {
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.nav_link:hover,
.nav_link--active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* モバイルナビ */
@media (max-width: 768px) {
  .header_menu { display: flex; }

  .nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 0.5rem 0 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .nav.is-open { display: flex; }

  .nav_link {
    padding: 0.65rem 24px;
    font-size: 0.9rem;
    border-radius: 0;
  }
}

/* === フッター === */
.footer {
  margin-top: 4rem;
  padding: 2rem 0;
  background: var(--primary);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  font-size: 0.8rem;
}

.footer_social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.social_link {
  text-transform: capitalize;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.15s;
}

.social_link:hover { color: #fff; }

.footer_copy { opacity: 0.6; }

/* === メインコンテンツ === */
.main {
  min-height: calc(100vh - 56px - 120px);
}

/* === Markdown コンテンツ === */
.md-content h2 { font-size: 1.25rem; font-weight: 700; margin: 2rem 0 0.75rem; color: var(--text); }
.md-content h3 { font-size: 1.05rem; font-weight: 600; margin: 1.5rem 0 0.5rem; color: var(--text); }
.md-content p { margin-bottom: 1rem; }
.md-content ul, .md-content ol { margin: 0.5rem 0 1rem 1.5rem; }
.md-content ul { list-style: disc; }
.md-content ol { list-style: decimal; }
.md-content li { margin-bottom: 0.3rem; }
.md-content a { color: var(--accent); text-decoration: underline; }
.md-content a:hover { opacity: 0.8; }
.md-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.md-content code {
  background: var(--bg-muted);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
}
.md-content strong { font-weight: 700; }
