/* ===== 全体レイアウト ===== */
body {
  font-family: 'Sawarabi Mincho', 'Noto Serif JP', serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(to bottom, #0c0c3a, #0b2f72, #020015 ); /* 背景色: ここを変える */
  background-attachment: fixed;
  color: #f2d58a;               /* 文字色: ここを変える */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center; /* ★ 全体の文字を中央寄せにする */

}

.container {
  display: flex;
  min-height: 100vh;        /* 画面いっぱいに */
}


/* ===== ヘッダー ===== */
header {
  background: rgba(6, 9, 49, 0.85); /* 半透明 */
  backdrop-filter: blur(4px);
  padding: 15px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ナビ内リンク。ホバーで光る */
nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: 0.2s;
  font-weight: 600;
  background: rgba(255,255,255,0.02);
}

nav a:hover {
  background: var(--accent);
  color: #fff;
  text-shadow: 0 0 6px rgba(255,255,255,0.6);
}

/* ===== 見出し ===== */

h1 {
  font-family: "Yu Mincho", serif;
  font-size: 2.5rem;
  text-align: center;
  margin: 30px 0 10px 0;
  color: #f2d58a; /* 色 */
  text-shadow: 0 0 6px rgba(255,140,0,0.6);
}

h2 {
  font-family: "Yu Mincho", serif;
  font-size: 1.8rem;
  margin-top: 25px;
  color: #e7d9bb; /* 和風赤 */
}

/* ==============================
   アコーディオン（用語カテゴリ）
============================== */
details {
  margin-top: 1rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  background: rgba(85, 74, 148, 0.336);
  overflow: hidden;
}

summary {
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 0.8rem 1rem;
  color: #f0d896;
  background: linear-gradient(to right, #412947, #110a68);
  transition:  0.3s;
}

summary:hover {
  background: linear-gradient(to right, #9e7297, #534e9b);
}

.term-list {
  list-style: none;
  padding: 0.8rem 1.5rem 1rem;
  margin: 0;
}

.term-link {
  cursor: pointer;
  color: #b22222;
  text-decoration: underline dotted rgba(255, 165, 0, 0.6);
  transition: 0.3s;
}

.term-link:hover {
  color: #ff4500;
  text-shadow: 0 0 6px rgba(255,140,0,0.3);
}


/* ===== セクションボックス ===== */
section {
  background-color: #161d49; /* 背景色 */
  border-radius: 12px;
  padding: 20px;
  margin: 20px auto;
  width: 90%;
  max-width: 900px;
  box-shadow: 0 0 12px rgba(255,165,0,0.3);
  backdrop-filter: blur(4px);
}

/* ===== 用語盤面 ===== */
.board {
  position: relative;
  width: 100%;
  height: 250px; /* ←高さを250pxに調整 */

  margin-top: 20px;

  overflow: hidden;
}

/* ノード */
.node {
  position: absolute;
  transform: translate(-50%, -50%);
  text-align: center;
  cursor: pointer;
}

#maryoku-node img {
  width: 100px;
  height: auto;

  border: none;
  background: none;

  transition: 0.3s;
}
.node img {
  width: 150px;
  height: auto;

  border: none;
  background: none;

  transition: 0.3s;
}

/* ホバー */
.node:hover img {
  transform: scale(1.1);
  filter: drop-shadow(0 0 10px rgb(255, 240, 189));
}
/* ラベル */
.node span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #f2d58a;
}

/* 未解放 */
.locked img {
  filter: grayscale(100%);
  opacity: 0.4;
  border-style: dashed;
}

.locked span {
  color: #777;
}

/* ------------------ モーダル ------------------ */
.modal {
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgba(0,0,0,0.85);
  display:flex;
  justify-content:center;
  align-items:center;
  opacity:0;
  pointer-events:none;
  transition: opacity 0.3s ease;
  text-align: center;
  z-index: 999;  /* モーダルを最前面に */
}

.modal.active {
  opacity:1;
  pointer-events:auto;
}

.modal-content {
  background: rgb(29, 28, 41);
  border:1px solid #555;
  padding:2rem;
  max-width:1000px;
  width:90%;
  border-radius:4px;
  position:relative;
  box-shadow:0 0 40px rgba(255,255,255,0.1);
  animation: modalIn 0.3s ease forwards;
}

@keyframes modalIn {
  from { transform: scale(0.9); opacity:0; }
  to   { transform: scale(1); opacity:1; }
}

.close-modal {
  position:absolute;
  top:0.5rem;
  right:0.5rem;
  background:none;
  border:none;
  color:#eee;
  font-size:1.5rem;
  cursor:pointer;
}

.modal-content h3 {
  margin-bottom:1rem;
  font-size:1.5rem;
}



/* ===== 定義(用語？)リスト ===== */

dl {
  margin-left: 1em;
}
dt {
  font-weight: bold;
  color: #dad9ba;
  margin-top: 0.8em;
}
dd {
  margin-left: 1em;
}

footer {
  text-align: center;
  padding: 15px 0;
  margin-top: 30px;
  font-size: 0.9rem;
}

/* スマホ向け（幅600px以下） */
@media screen and (max-width: 600px) {
  body {
    font-size: 14px;
  }
  .container {
    flex-direction: column;
    gap: 10px;
  }
  
  /* 組織セクション用 - スマートフォン対応 */
  .board {
    height: 250px;
    margin-top: 0;
    margin-bottom: 0;
  }
  
  .node img {
    width: 100px;
  }
}

/* タブレット向け（幅900px以下） */
@media screen and (max-width: 900px) {
  .menu {
    font-size: 16px;
  }
}
