/* ===================================
   真・三國無双2 Remastered 攻略サイト
   =================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'MS Gothic', 'ＭＳ ゴシック', 'Hiragino Kaku Gothic ProN', monospace;
  background: #FFFFFF;
  color: #000000;
  line-height: 1.8;
  min-height: 100vh;
}

a {
  color: #0000FF;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ヘッダー */
header {
  background: #000000;
  padding: 10px;
  text-align: center;
}

.header-inner {
  max-width: 800px;
  margin: 0 auto;
}

.logo-text h1 {
  font-size: 1.2rem;
  color: #FFFFFF;
  margin-bottom: 5px;
}

.logo-text .subtitle {
  font-size: 0.7rem;
  color: #CCCCCC;
}

/* ナビゲーション */
nav {
  background: #333333;
  padding: 5px;
  text-align: center;
}

nav a {
  color: #FFFFFF;
  padding: 5px 10px;
  font-size: 0.8rem;
  text-decoration: none;
  display: inline-block;
}

nav a:hover {
  background: #555555;
  text-decoration: none;
}

nav a.active {
  background: #000080;
}

.menu-toggle {
  display: none;
  background: #333333;
  border: 1px solid #666666;
  color: #FFFFFF;
  padding: 5px 10px;
  cursor: pointer;
}

/* メインコンテンツ */
main {
  max-width: 800px;
  margin: 0 auto;
  padding: 10px;
}

/* パンくずリスト */
.breadcrumb {
  padding: 5px 0;
  color: #666666;
  font-size: 0.75rem;
  margin-bottom: 10px;
}

.breadcrumb a {
  color: #0000FF;
}

/* テーブル */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  border: 1px solid #000000;
}

th,
td {
  padding: 8px;
  text-align: left;
  border: 1px solid #000000;
  font-size: 0.85rem;
  vertical-align: top;
}

th {
  background: #000000;
  color: #FFFFFF;
  font-weight: normal;
  text-align: center;
}

td {
  background: #FFFFFF;
}

/* ヘッダーセル */
td[bgcolor="#000000"],
th[bgcolor="#000000"] {
  background: #000000;
  color: #FFFFFF;
}

/* 見出し */
h1 {
  font-size: 1.2rem;
  text-align: center;
  margin: 10px 0;
}

h3 {
  font-size: 1rem;
  margin: 10px 0 5px;
  padding: 5px;
  background: #EEEEEE;
  border: 1px solid #CCCCCC;
}

/* ツリーリスト */
.tree-list {
  margin: 5px 0;
  font-size: 0.85rem;
}

.tree-list a {
  color: #0000FF;
}

/* セクション */
.section {
  margin-bottom: 20px;
}

.section-header {
  margin-bottom: 10px;
}

.section-header h2 {
  font-size: 1rem;
  text-align: center;
  padding: 5px;
  background: #EEEEEE;
  border: 1px solid #CCCCCC;
}

/* フィルタタブ */
.filter-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 3px 8px;
  border: 1px solid #000000;
  background: #FFFFFF;
  color: #000000;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: inherit;
}

.filter-tab:hover {
  background: #EEEEEE;
}

.filter-tab.active {
  background: #000000;
  color: #FFFFFF;
}

/* 検索ボックス */
.search-box {
  margin: 5px 0;
}

.search-box input {
  width: 100%;
  padding: 5px;
  border: 1px solid #000000;
  font-size: 0.85rem;
  font-family: inherit;
}

/* ティップスボックス */
.tips-box {
  border: 1px solid #000000;
  padding: 10px;
  margin: 10px 0;
}

.tips-box h4 {
  margin-bottom: 5px;
  font-size: 0.85rem;
}

.tips-box ul {
  list-style: disc;
  padding-left: 20px;
  font-size: 0.8rem;
}

.tips-box li {
  margin-bottom: 3px;
}

/* フッター */
footer {
  background: #333333;
  color: #FFFFFF;
  padding: 10px;
  margin-top: 20px;
  text-align: center;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  text-align: left;
}

.footer-section h4 {
  color: #FFFFFF;
  margin-bottom: 5px;
  font-size: 0.8rem;
  border-bottom: 1px solid #666666;
  padding-bottom: 3px;
}

.footer-section a {
  display: block;
  color: #CCCCCC;
  font-size: 0.7rem;
  text-decoration: none;
  padding: 2px 0;
}

.footer-section a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 10px;
  padding-top: 5px;
  border-top: 1px solid #666666;
  font-size: 0.65rem;
  color: #CCCCCC;
}

/* レスポンシブ */
@media (max-width: 600px) {
  .menu-toggle {
    display: block;
  }

  nav {
    display: none;
    background: #333333;
    padding: 5px;
  }

  nav.open {
    display: block;
  }

  nav a {
    display: block;
    padding: 8px;
    border-bottom: 1px solid #555555;
  }

  table {
    font-size: 0.75rem;
  }

  th,
  td {
    padding: 4px;
  }
}

/* スクロールバー */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #CCCCCC;
}

::-webkit-scrollbar-thumb {
  background: #666666;
  border: 1px solid #333333;
}

/* NEWバッジ */
.badge-new {
  display: inline-block;
  background: #FF0000;
  color: #FFFFFF;
  padding: 0 4px;
  font-size: 0.6rem;
  font-weight: bold;
  margin-left: 3px;
}

/* トップに戻るボタン */
.back-to-top {
  position: fixed;
  bottom: 10px;
  right: 10px;
  padding: 5px 10px;
  background: #000000;
  color: #FFFFFF;
  border: 1px solid #666666;
  font-size: 0.7rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 999;
  font-family: inherit;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #333333;
}

/* 画像スタイル */
.icon-image img {
  max-width: 100%;
  height: auto;
  border: 1px solid #000000;
}

/* テーブル内のリンク */
td a {
  color: #0000FF;
}

/* ツリー構造 */
.tree {
  list-style: none;
  margin: 5px 0;
  padding-left: 10px;
  font-size: 0.85rem;
  line-height: 1.6;
}

.tree li {
  position: relative;
  padding-left: 15px;
}

.tree li::before {
  content: '├';
  position: absolute;
  left: 0;
  color: #666666;
}

.tree li:last-child::before {
  content: '└';
}

.tree a {
  color: #0000FF;
}

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

.section-note {
  font-size: 0.8rem;
  color: #666666;
  margin-bottom: 8px;
}

/* ===================================
   アコーディオン（評価ページ用）
   =================================== */

.accordion {
  border: 1px solid #CCCCCC;
  margin-bottom: 5px;
}

.accordion-header {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  background: #F5F5F5;
  cursor: pointer;
  user-select: none;
  font-size: 0.85rem;
}

.accordion-header:hover {
  background: #EEEEEE;
}

.accordion-icon {
  margin-right: 8px;
  font-size: 0.8rem;
  color: #666666;
  min-width: 1em;
}

.accordion-title {
  flex: 1;
}

.accordion-body {
  display: none;
  padding: 10px;
  background: #FFFFFF;
  font-size: 0.85rem;
  line-height: 1.6;
  border-top: 1px solid #CCCCCC;
}

.accordion.open .accordion-body {
  display: block;
}

.review-placeholder {
  color: #999999;
  font-style: italic;
  font-size: 0.8rem;
}

.review-link-note {
  font-size: 0.8rem;
}

/* ===================================
   トップページ用スタイル
   =================================== */

/* サイト紹介 */
.site-intro {
  border: 1px solid #000000;
  padding: 15px;
  margin-bottom: 15px;
  background: #F5F5F5;
}

.site-intro h2 {
  font-size: 1rem;
  text-align: center;
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid #CCCCCC;
}

.site-intro p {
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.6;
}

/* 取り扱いタイトルバナー */
.title-banner {
  margin-bottom: 15px;
}

.title-banner h2 {
  font-size: 1rem;
  text-align: center;
  margin-bottom: 8px;
  padding: 5px;
  background: #EEEEEE;
  border: 1px solid #CCCCCC;
}

.banner-card {
  display: flex;
  border: 2px solid #000000;
  background: #FFFFFF;
  margin-bottom: 10px;
}

.banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  padding: 15px 20px;
  background: #000000;
  color: #FFFFFF;
  min-width: 80px;
}

.banner-info {
  padding: 12px 15px;
  flex: 1;
}

.banner-info h3 {
  font-size: 1rem;
  margin-bottom: 5px;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
}

.banner-info h3 a {
  color: #0000FF;
}

.banner-meta {
  font-size: 0.75rem;
  color: #666666;
  margin-bottom: 5px;
}

.banner-desc {
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.banner-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.banner-btn {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid #000000;
  background: #FFFFFF;
  color: #000000;
  font-size: 0.75rem;
  text-decoration: none;
}

.banner-btn:hover {
  background: #000000;
  color: #FFFFFF;
  text-decoration: none;
}

/* 更新履歴 */
.update-history {
  margin-bottom: 15px;
}

.update-history h2 {
  font-size: 1rem;
  text-align: center;
  margin-bottom: 8px;
  padding: 5px;
  background: #EEEEEE;
  border: 1px solid #CCCCCC;
}

.update-date {
  white-space: nowrap;
  font-size: 0.8rem;
  color: #666666;
  width: 90px;
}

/* コンテンツ紹介 */
.content-overview {
  margin-bottom: 15px;
}

.content-overview h2 {
  font-size: 1rem;
  text-align: center;
  margin-bottom: 8px;
  padding: 5px;
  background: #EEEEEE;
  border: 1px solid #CCCCCC;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.overview-card {
  border: 1px solid #000000;
  padding: 10px;
  background: #FFFFFF;
}

.overview-card h3 {
  font-size: 0.85rem;
  margin-bottom: 5px;
  background: none;
  border: none;
  padding: 0;
}

.overview-card h3 a {
  color: #0000FF;
}

.overview-card p {
  font-size: 0.75rem;
  color: #333333;
}

/* タイトル一覧 */
.title-list {
  margin-bottom: 15px;
}

.title-list h2 {
  font-size: 1rem;
  text-align: center;
  margin-bottom: 8px;
  padding: 5px;
  background: #EEEEEE;
  border: 1px solid #CCCCCC;
}

.title-list-note {
  font-size: 0.75rem;
  color: #666666;
  text-align: center;
  margin-bottom: 10px;
}

.title-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.title-card {
  display: flex;
  border: 1px solid #000000;
  background: #FFFFFF;
  padding: 10px;
}

.title-card.active {
  border: 2px solid #0000FF;
  background: #F0F8FF;
}

.title-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  padding: 10px;
  background: #EEEEEE;
  min-width: 50px;
  margin-right: 10px;
}

.title-card.active .title-icon {
  background: #0000FF;
  color: #FFFFFF;
}

.title-info {
  flex: 1;
}

.title-info h3 {
  font-size: 0.85rem;
  margin-bottom: 3px;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
}

.title-info h3 a {
  color: #0000FF;
}

.title-card.active .title-info h3 a {
  color: #0000FF;
  font-weight: bold;
}

.title-meta {
  font-size: 0.7rem;
  color: #666666;
  margin-bottom: 2px;
}

.title-genre {
  font-size: 0.7rem;
  color: #333333;
  margin-bottom: 3px;
}

.badge-plan {
  display: inline-block;
  background: #CCCCCC;
  color: #666666;
  padding: 0 4px;
  font-size: 0.6rem;
  font-weight: bold;
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
  .title-grid {
    grid-template-columns: 1fr;
  }

  .title-card {
    flex-direction: column;
  }

  .title-icon {
    min-width: auto;
    padding: 8px;
    margin-right: 0;
    margin-bottom: 8px;
  }

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

/* ===================================
   コンテンツグリッド（攻略TOP用）
   =================================== */

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 10px;
}

.content-section h3 {
  font-size: 1rem;
  margin: 10px 0 5px;
  padding: 5px;
  background: #EEEEEE;
  border: 1px solid #CCCCCC;
}

.content-section h4 {
  font-size: 0.9rem;
  margin: 10px 0 5px;
  padding: 3px 5px;
  background: #F5F5F5;
  border-bottom: 1px solid #CCCCCC;
}

/* 勢力ナビゲーション */
.faction-nav {
  margin-bottom: 12px;
  padding: 6px 8px;
  background: #f5f5f5;
  border: 1px solid #ccc;
  font-size: 0.85rem;
}

.faction-nav-label {
  font-weight: bold;
  margin-right: 4px;
}

.faction-nav a {
  display: inline-block;
  padding: 2px 10px;
  margin: 0 2px;
  border: 1px solid #999;
  background: #fff;
  color: #000;
  text-decoration: none;
}

.faction-nav a:hover {
  background: #eee;
}

.faction-nav a.active {
  background: #333;
  color: #fff;
  border-color: #333;
}

/* キャラクター一覧 */
.char-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  border: 1px solid #000;
  margin-bottom: 15px;
}

.char-box {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #999;
  background: #fff;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* イベントテーブル列幅 */
.ev-name {
  width: auto;
  min-width: 140px;
}

.ev-cond {
  width: 40%;
}

/* ===== serifu 関連 ===== */
.serifu-section { margin-bottom: 20px; }
.serifu-section h3 { margin: 0 0 8px; padding: 6px 10px; color: #fff; font-size: 0.9rem; }
.serifu-shu h3 { background: #008000; }
.serifu-wei h3 { background: #000080; }
.serifu-wu h3 { background: #CC0000; }
.serifu-other h3 { background: #666666; }
.serifu-list { margin: 0 0 10px; }
.serifu-warlord { margin-bottom: 12px; }
.serifu-warlord h4 { font-size: 0.9rem; padding: 4px 8px; background: #f5f5f5; border-left: 3px solid #999; margin-bottom: 4px; }
.serifu-shu .serifu-warlord h4 { border-left-color: #008000; }
.serifu-wei .serifu-warlord h4 { border-left-color: #000080; }
.serifu-wu .serifu-warlord h4 { border-left-color: #CC0000; }
.serifu-other .serifu-warlord h4 { border-left-color: #666666; }
.serifu-warlord ul { list-style: none; padding: 0; margin: 0; }
.serifu-warlord li { padding: 3px 8px 3px 20px; font-size: 0.85rem; border-bottom: 1px dotted #ddd; position: relative; }
.serifu-warlord li::before { content: '・'; position: absolute; left: 8px; color: #999; }
.serifu-warlord li:last-child { border-bottom: none; }
.serifu-tabs { display: flex; gap: 2px; margin-bottom: 12px; }
.serifu-tab { padding: 4px 14px; border: 1px solid #000; background: #fff; color: #000; cursor: pointer; font-size: 0.8rem; font-family: inherit; }
.serifu-tab:hover { background: #eee; }
.serifu-tab.active { background: #000; color: #fff; }

/* ===== キャラ評価 関連 ===== */
.char-review { border: 1px solid #000; margin-bottom: 10px; }
.char-review h3 { margin: 0; padding: 6px 10px; font-size: 0.9rem; background: #f5f5f5; border-bottom: 1px solid #000; }
.char-review .review-body { padding: 8px 10px; font-size: 0.85rem; }
.review-body p { margin-bottom: 6px; }
.review-body p:last-child { margin-bottom: 0; }

/* ===== items 関連 ===== */
.rating { padding: 1px 6px; border-radius: 2px; font-weight: bold; color: #fff; font-size: 0.7rem; }
.rating-a { background: #2d8a4e; }
.rating-b { background: #2563eb; }
.rating-c { background: #d97706; }
.rating-d { background: #dc2626; }

/* ===== weapons 関連 ===== */
.attr-fire { color: #cc3300; font-weight: bold; }
.attr-thunder { color: #3366cc; font-weight: bold; }
.attr-slash { color: #993399; font-weight: bold; }
.attr-wind { color: #228866; font-weight: bold; }
.attr-light { color: #ccaa00; font-weight: bold; }
.attr-none { color: #999999; }
.weapon-name { font-weight: bold; font-size: 1rem; }
.stat-table td { text-align: center; }
.stat-table th { text-align: center; font-size: 0.75rem; }
.faction-label { font-size: 0.85rem; font-weight: bold; margin-top: 15px; margin-bottom: 5px; padding: 3px 8px; display: inline-block; color: #fff; }
.faction-shu { background: #006600; }
.faction-wei { background: #004466; }
.faction-wu { background: #660000; }
.faction-other { background: #444444; }
.cond-cell { font-size: 0.78rem; text-align: left; }
.item-builtin { color: #cc0000; font-weight: bold; }

/* ===== stage-gaitei 関連 ===== */
.scenario-section { border: 2px solid #000; margin-bottom: 20px; }
.scenario-header { padding: 6px 10px; color: #fff; font-size: 0.95rem; font-weight: bold; }
.scenario-blue .scenario-header { background: #000080; }
.scenario-red .scenario-header { background: #800000; }
.scenario-body { padding: 10px; }
.stage-map { display: block; width: 50%; height: auto; margin: 0 auto 10px; }
.aw { display: flex; gap: 0; margin-bottom: 10px; align-items: flex-start; }
.aw-tbl { flex: 1; border-collapse: collapse; }
.aw-tbl th { padding: 4px 8px; font-size: 0.8rem; color: #fff; border: 1px solid #000; text-align: center; }
.aw-tbl th.ally { background: #000080; }
.aw-tbl th.enemy { background: #800000; }
.aw-tbl td { padding: 3px 6px; font-size: 0.8rem; border: 1px solid #000; }
.aw-tbl td.n { text-align: left; }
.aw-tbl td.n.hl { background: #ffeeba; }
.aw-tbl td.m { text-align: center; white-space: nowrap; }
.aw .aw-tbl:last-child td.n { text-align: right; }
@media (max-width: 600px) { .aw { flex-direction: column; } .aw-tbl+.aw-tbl { border-top: 1px solid #000; } }
.cond-shared { width: auto; min-width: 360px; border-collapse: collapse; margin-bottom: 12px; }
.cond-shared th, .cond-shared td { padding: 4px 10px; font-size: 0.8rem; border: 1px solid #000; text-align: center; }
.cond-shared th:first-child { background: #333; color: #fff; text-align: center; width: 100px; }
.cond-shared td { background: #fff; }
.event-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.event-table th { padding: 4px 6px; font-size: 0.8rem; background: #333; color: #fff; text-align: center; border: 1px solid #000; }
.event-table td { padding: 4px 6px; font-size: 0.8rem; border: 1px solid #ccc; }
.event-table tr:nth-child(even) td { background: #fafafa; }
.strategy-box { border: 1px solid #000; padding: 8px 10px; font-size: 0.85rem; background: #f5f5f5; }
.section-label { font-size: 0.85rem; font-weight: bold; margin: 10px 0 4px; padding: 3px 6px; border-bottom: 2px solid #333; }