:root {
  --overlay-black: rgba(0, 0, 0, 0.70);
  --overlay-white: rgba(255, 255, 255, 0.70);
  --bg-gray: #b3b3b3;
  --accent-red: #ff0000;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: sans-serif;

  /* background: fixed 
  linear-gradient(
    to top right,
    #976999 0%,
    #345d70 25%,
    #1b1c5e 50%,
    #100830 100%
  );
  transition: background-color 0.8s ease; */
}

/* body.moning {
  background: fixed 
  linear-gradient(
    to top right,
    #f9ffea 0%,
    #35cae4 40%,
    #2e6fac 75%,
    #1763d4 100%
  );
}

body.day {
  background: fixed 
  linear-gradient(
    to top right,
    #9FCFFD 0%,
    #9F64AC 50%,
    #322480 100%
  );
} */


body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;

  background-image: url('../img/background.jpg');
  background-size: cover;
  background-position:  bottom right;
  z-index: -1;
}

body > * {
  opacity: 0;
  animation: fadeIn 0.15s 0.5s ease forwards;
}
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

footer {
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  margin: 40px 0 0 0;
  padding: 10px;
}

footer .copyrights {
  text-align: center;
  font-size: 12px;
}

.visible {
  visibility: visible;
}

.hidden {
  visibility: hidden;
}

main.top { 
  text-align: center;
  margin: 30px 20px;
}
main.top img {
  max-width: 90%;
}
main.top .genre {
  color: #fff;
  display: inline-block;
  padding: 3px 5px;
  border-radius: 3px;
  background-color: #333;
}

main.top .description {
  font-family: "Yu Mincho", "Hiragino Mincho Pro", "serif";
  font-weight: 500;
  font-size: 18px;
  color: #fff;
  text-shadow:
    0 0 5px #fff,
    0 0 10px #000,
    0 0 20px #cc0000,
    0 0 40px #ff0000,
    0 0 80px #ff3200;
}

/*  レイアウト ------- */
.content-wrapper {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 50px;
  gap: 30px;
}

/* 左カラム */
.col-left {
  flex: 1; 
  min-width: 0; /* 省略処理（...）を正常に動作させるために必須 */
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 右カラム */
.col-right {
  width: 350px;
  flex-shrink: 0; /* 画面が狭くなってもこの幅を維持 */
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section {
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.7);
}

/* スマホ対応 */
@media (max-width: 900px) {
  .content-wrapper {
    flex-direction: column;
    gap: 30px;
  }
  
  .col-right {
    width: 100%;
    order: 2;
  }

  .col-left {
    order: 1;
  }
}

/* --- コンテンツスタイル --- */
h2 { font-size: 1.4rem; margin-bottom: 10px; margin-top: 0; }

/* 本編マンガ */
.card-item {
  display: block;
  text-decoration: none;
  height: 55px;
  border: 1px solid #000;
  margin-bottom: 8px;
  background-image: linear-gradient(var(--overlay-black),
  var(--overlay-black)),
  var(--bg-img);
  background-size: cover;
  background-position: center;
  color: #fff;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  transition: 0.2s;
}
.card-item:hover {
  background-image: linear-gradient(var(--overlay-white), var(--overlay-white)), var(--bg-img);
  color: #000;
  text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
}
.card-content { display: flex; justify-content: space-between; align-items: center; padding: 0 15px; height: 100%; container-type: inline-size; }
.card-title { margin: 0; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.card-meta { white-space: nowrap; font-size: 0.85rem; margin-left: 10px; }
@container (max-width: 450px) { .card-meta { display: none; } }

/* ギャラリー */
.gallery-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.img-link { width: 100px; height:100px; background: #fff; border: 1px solid #999; }

/* ギャラリーログ */
#gallery-log-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* 登場人物 */
.char-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; }
.char-link {
  background: #222; border: 1px solid #999; aspect-ratio: 1/1.2;
  display: flex;  flex-direction: column;
  /* align-items: center; */
  justify-content: center;
  text-decoration: none;
  color: #fff;
  font-size: 0.75rem!important;
  text-align: center;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0); 
  text-decoration: none;
  padding: 0!important;
  cursor: pointer;
}
.char-link img {
  flex: 0.8; /* 親要素の高さを均等に分割 */
  display: flex;
  justify-content: center; /* 横方向中央配置 */
  align-items: center; /* 縦方向中央配置 */
  width: 100%;
  /* height: 80%; */
  object-fit: cover;
}
.char-link div{
  flex: 0.2; /* 親要素の高さを均等に分割 */
  display: flex;
  justify-content: center; /* 横方向中央配置 */
  align-items: center; /* 縦方向中央配置 */
  width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap; 

  /* width: 100%;
  height: 20%; */
}
.char-link--large { grid-column: span 4; } /* 12/3 = 4 */
.char-link:not(.char-link--large) { grid-column: span 3; } /* 12/4 = 3 */

/* 用語解説 */
#glossary-list { display: flex; flex-wrap: wrap; gap: 8px; }
.glossary-item { padding: 6px 12px; cursor: pointer; position: relative; font-size: 0.9rem; }

/* 関連リンク */
.other-list {
  display: flex;
  flex-direction: column; /* 縦並び */
  gap: 8px;
}
.other-item {
  width: 100%;
}
.other-list h4 {
  margin: 0px 0px 5px 0px;
}

/* サイトTOPへ戻るリンク */
a#returnTop {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: 20px;
  max-width: 1180px;
  margin: 0 auto;
}

.text-link {
  text-decoration: none;
  border: 1px #888 solid;
  background-color: #222;
  color: #fff;
}
.text-link:hover {
  background-color: #fff;
  color: #000;
}

a.text-link {
  padding: 6px 12px;
  font-size: 0.9rem;
  display: inline-block;
}
button.text-link {
  padding: 6px 12px;
  cursor: pointer;
  position: relative;
  font-size: 0.9rem;
}




