/* ==============================
   全体設定（昼・太陽イメージ）
============================== */
body {
  font-family: "Hannari", "Yu Mincho", serif;
  color: #2E1F14;
  background: linear-gradient(to bottom, #6c272d, #FFD180);
  background-attachment: fixed;
  font-size: 1rem;
  line-height: 1.2;
  margin: 0;
  padding: 0;
}

/* ==============================
   ヘッダー・ナビ
============================== */
header {
  background: rgba(255, 244, 214, 0.85);
  backdrop-filter: blur(4px);
  padding: 15px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

header nav a {
  color: #B22222;
  text-decoration: none;
  margin-right: 15px;
  font-weight: bold;
  transition: 0.3s;
}

header nav a:hover {
  color: #FF4500;
  text-shadow: 0 0 6px rgba(255,69,0,0.5);
}

/* ==============================
   見出し
============================== */
h1 {
  font-family: "Yu Mincho", serif;
  font-size: 2.5rem;
  text-align: center;
  margin: 30px 0 10px;
  color: #f2d58a;
  text-shadow: 0 0 6px rgba(255,140,0,0.6);
}

h2 {
  font-family: "Yu Mincho", serif;
  font-size: 1.8rem;
  border-bottom: 2px solid #FFA500;
  padding-bottom: 6px;
  margin-top: 25px;
  color: #B22222;
  text-shadow: 0 0 4px rgba(255,165,0,0.5);
}

/* ==============================
   セクション・カード
============================== */
section {
  background: rgba(255, 244, 214, 0.85);
  border-left: 4px solid #FF8C00;
  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);
}

/* ==============================
   用語リスト
============================== */
dl dt {
  font-weight: bold;
  color: #D2691E;
  margin-top: 10px;
}

dl dd {
  margin-left: 15px;
  margin-bottom: 10px;
}

/* ==============================
   画像
============================== */
img {
  max-width: 100%;
  display: block;
  margin: 15px auto;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(255,200,150,0.3);
}

/* ==============================
   フッター
============================== */
footer {
  text-align: center;
  padding: 15px 0;
  margin-top: 30px;
  color: #B22222;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255,165,0,0.3);
}

/* ==============================
   アコーディオン（用語カテゴリ）
============================== */
details {
  margin-top: 1rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.75);
  overflow: hidden;
}

summary {
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 0.8rem 1rem;
  color: #5c2c0d;
  background: linear-gradient(to right, #ffe9b3, #ffcc80);
  transition: background 0.3s;
}

summary:hover {
  background: linear-gradient(to right, #ffd27f, #ffb347);
}

.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);
}

/* ==============================
   モーダル（巻物風）
============================== */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
}

.modal-content {
  position: relative;
  margin: 10% auto;
  max-width: 650px;
  padding: 2rem 2.5rem;
  color: #ebcd97;
  font-family: "Yu Mincho", "Hannari", serif;
  background:
    radial-gradient(circle at left center, rgba(120, 80, 30, 0.4), transparent 60%),
    radial-gradient(circle at right center, rgba(120, 80, 30, 0.4), transparent 60%),
    url("images/wasPaper_texture.jpg");
  background-size: auto, auto, cover;
  background-repeat: no-repeat;
  border-top: 10px solid #c9a063;
  border-bottom: 10px solid #c9a063;
  box-shadow: 0 0 20px rgba(60, 30, 10, 0.7),
              inset 0 0 30px rgba(255, 245, 200, 0.3);
  animation: scrollOpen 0.5s ease;
}
.modal-content p {
  margin: 0.1em 0;
}

.modal-content::before,
.modal-content::after {
  content: "";
  position: absolute;
  top: -20px;
  bottom: -20px;
  width: 16px;
  background: radial-gradient(circle, #9c6a28 20%, #4b2c10 90%);
  border-radius: 50px;
}

.modal-content::before { left: -25px; }
.modal-content::after { right: -25px; }

.close {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #4b2c10;
  text-shadow: 0 0 5px rgba(255,255,255,0.6);
  transition: transform 0.2s;
}

.close:hover {
  transform: scale(1.2);
}

@keyframes scrollOpen {
  from { transform: scaleY(0.1); opacity: 0; }
  to { transform: scaleY(1); opacity: 1; }
}

/* ==============================
   レスポンシブ対応
============================== */
@media screen and (max-width: 900px) {
  .card-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .menu {
    font-size: 16px;
  }
}

@media screen and (max-width: 600px) {
  body {
    font-size: 14px;
  }
  .container {
    flex-direction: column;
    gap: 10px;
  }
  .card-list {
    grid-template-columns: 1fr;
  }
}
/* =============== スマホ対応（幅600px以下） =============== */
@media screen and (max-width: 600px) {

  .modal-content {
    width: 90%;
    margin: 20% auto;
    padding: 1.2rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    border-top: 6px solid #c9a063;
    border-bottom: 6px solid #c9a063;
  }

  .modal-content::before,
  .modal-content::after {
    width: 10px;
    top: -10px;
    bottom: -10px;
  }

  .modal-content::before { left: -15px; }
  .modal-content::after { right: -15px; }

  .close {
    font-size: 1.2rem;
    right: 10px;
  }
}

/* =============== タブレット対応（幅900px以下） =============== */
@media screen and (max-width: 900px) {
  .modal-content {
    width: 85%;
    margin: 12% auto;
  }
}