﻿@charset "utf-8";

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Noto Sans JP', Verdana, Arial, 'Hiragino Kaku Gothic Pro', sans-serif;
}

body {
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

#container {
  margin: 0 auto;
}

/* ヘッダー */
#header {
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.8rem;
  font-weight: 700;
}

.site-title a {
  color: #1a73e8;
  text-decoration: none;
}

#navi ul {
  display: flex;
  list-style: none;
}

#navi li a {
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s;
}

#navi li a:hover {
  color: #1a73e8;
}

/* ハンバーガーメニュー */
#nav-drawer {
  display: none;
}

#nav-open {
  display: inline-block;
  width: 30px;
  height: 22px;
  vertical-align: middle;
}

#nav-open span,
#nav-open span:before,
#nav-open span:after {
  position: absolute;
  height: 3px;
  width: 25px;
  border-radius: 3px;
  background: #333;
  display: block;
  content: '';
  cursor: pointer;
}

#nav-open span:before {
  bottom: -8px;
}

#nav-open span:after {
  bottom: -16px;
}

#nav-close {
  display: none;
  position: fixed;
  z-index: 99;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  opacity: 0;
  transition: 0.3s ease-in-out;
}

#nav-content {
  overflow: auto;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 80%;
  max-width: 300px;
  height: 100%;
  background: #fff;
  transition: 0.3s ease-in-out;
  transform: translateX(-105%);
}

#nav-content ul {
  list-style: none;
  padding: 20px;
}

#nav-content li a {
  display: block;
  padding: 10px;
  color: #333;
  text-decoration: none;
  font-size: 1rem;
}

#nav-content li a:hover {
  background: #f0f0f0;
}

#nav-input:checked ~ #nav-close {
  display: block;
  opacity: 0.5;
}

#nav-input:checked ~ #nav-content {
  transform: translateX(0);
  box-shadow: 6px 0 25px rgba(0, 0, 0, 0.15);
}

/* メインコンテンツ */
#mainContent {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.main-article {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.article-title {
  font-size: 2rem;
  color: #1a73e8;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.5rem;
  color: #333;
  margin: 20px 0 10px;
}

.sentence {
  margin: 15px 0;
}

.sentence p {
  font-size: 1rem;
  color: #333;
}

/* 吹き出し */
.balloon {
  display: flex;
  align-items: flex-start;
  margin: 20px 0;
}

.faceicon {
  width: 60px;
  margin-right: 15px;
}

.faceicon img {
  width: 100%;
  height: auto;
  border-radius: 50%;
}

.chatting {
  flex: 1;
}

.says {
  background: #e8f0fe;
  padding: 15px;
  border-radius: 8px;
  position: relative;
}

.says:after {
  content: '';
  position: absolute;
  left: -10px;
  top: 20px;
  border: 10px solid transparent;
  border-right: 10px solid #e8f0fe;
}

.says p {
  margin: 0;
  font-size: 0.95rem;
}

/* サイドバー */
.sidebar {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sidebar-title {
  font-size: 1.3rem;
  color: #333;
  margin-bottom: 15px;
}

.related-posts {
  list-style: none;
}

.related-posts li {
  margin: 10px 0;
}

.related-posts li a {
  color: #1a73e8;
  text-decoration: none;
  font-size: 0.95rem;
  display: block;
  padding: 5px 0;
}

.related-posts li a:hover {
  text-decoration: underline;
  color: #1557b0;
}

/* 目次テーブル */
.toc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
}

.toc-table thead {
  background: #1a73e8;
  color: #fff;
}

.toc-table th {
  padding: 12px 15px;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
}

.toc-table tbody tr {
  transition: background 0.2s;
}

.toc-table tbody tr:hover {
  background: #e8f0fe;
}

.toc-table td {
  padding: 12px 15px;
  font-size: 0.95rem;
  border-bottom: 1px solid #e0e0e0;
}

.toc-table td a {
  color: #1a73e8;
  text-decoration: none;
  transition: color 0.2s;
}

.toc-table td a:hover {
  color: #1557b0;
  text-decoration: underline;
}

.toc-table td:last-child {
  color: #555;
  font-weight: 500;
}

/* スクリーンリーダー用の非表示キャプション */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ボタン */
.center-frame {
  text-align: center;
  margin: 20px 0;
}

.simple-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #1a73e8;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background 0.3s;
}

.simple-btn:hover {
  background: #1557b0;
}

/* フッター */
#footer {
  background: #333;
  color: #fff;
  padding: 20px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#fnavi ul {
  display: flex;
  list-style: none;
}

#fnavi li a {
  padding: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
}

#fnavi li a:hover {
  text-decoration: underline;
}

#footer p {
  font-size: 0.8rem;
}

/* タブレット (768px以下) */
@media (max-width: 768px) {
  #container {
    width: 100%;
  }

  .header-inner {
    padding: 10px;
  }

  #navi {
    display: none;
  }

  #nav-drawer {
    display: block;
  }

  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar {
    margin-top: 20px;
  }

  .article-title {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .faceicon {
    width: 50px;
  }

  .says {
    padding: 12px;
  }

  .related-posts li a {
    font-size: 0.9rem;
  }
}

/* モバイル (479px以下) */
@media (max-width: 479px) {
  .header-inner {
    padding: 8px;
  }

  .site-title {
    font-size: 1.4rem;
  }

  .main-article,
  .sidebar {
    padding: 15px;
  }

  .article-title {
    font-size: 1.4rem;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .faceicon {
    width: 40px;
  }

  .says {
    padding: 10px;
  }

  .simple-btn {
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  .related-posts li a {
    font-size: 0.85rem;
  }

  #footer {
    padding: 15px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  #fnavi ul {
    flex-direction: column;
  }

  #fnavi li a {
    padding: 5px;
  }
}