/* 全体 */
body {
  margin: 0;
  font-family: sans-serif;
  background: linear-gradient(#34495e, #3c4d66);
  color: white;
}


/* ===================== */
/* ヘッダー */
/* ===================== */

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 40px 20px;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  min-height: 400px;/* 画像の高さと同じ数字を入れる */

}

.lang-switch {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 14px;
}

.header-text h1 {
  font-size: 32px;
  letter-spacing: 2px;

  margin: 0;
  overflow: hidden;
}

.sub {
  font-size: 14px;
  opacity: 0.7;
}

.header-text h2 {
  font-size: 28px;
  margin-top: 20px;
  border-bottom: 2px solid #00e0ff;
  display: inline-block;
}

.header-text {
  position: absolute;
  top: 40px;
  left: 10px;
  max-width: 800px;
  z-index: 2;
 }


.header-image img {
  position: absolute;
  top: 60px;
  right: 0;
  max-width: 1100px;
  display: block;
  z-index: 1; 
}


/* ===================== */
/* キャラ一覧 */
/* ===================== */

.character-list {
  gap: 24px;
  margin: 0 auto;
  padding: 0 16px;
  max-width: 1350px
}

.character-wrapper {
  display: grid;
  grid-template-columns: 4fr 3fr; 
  align-items: start;
  gap: 40px;
}


.character-card {
  min-width: 250px;
}



.character-text {
  overflow-wrap: break-word;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
}

.main-list,
.sub-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  min-width: 0;
  max-width: 1000px;
  margin: 0 auto;
}

.main-characters {
  max-width: 700px;
  justify-self: start; 
}

.sub-characters {
  padding-top: 100px; /* 調整 */
  max-width: 530px;
  justify-self: start; 
}




/* ===================== */
/* カード */
/* ===================== */

.character-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;


  padding: 15px;
  border-radius: 10px;

  background: linear-gradient(135deg, #00bcd4, #008c9e);
  cursor: pointer;
  transition: 0.2s;
}

.character-card:hover {
  transform: translateY(-3px);
}


/* 画像 */

.character-img {
  width: 80px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
}



/* セクション同士の余白 */

section {
  margin-top: 60px;
}

/* テキスト */

.character-text h3 {
  margin: 0;
  font-size: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.5);
  display: inline-block;
  padding-bottom: 2px;
}

.desc {
  font-size: 13px;
  margin: 5px 0;
}

.meta {
  font-size: 11px;
  opacity: 0.7;
}







/* リンク */
.page a {
  color: #00bcd4;
  text-decoration: underline;
  text-decoration-color: rgba(0, 188, 212, 0.3);
}

.page a:hover {
  color: #0097a7;
}

/* 戻る */
.back {
  display: inline-block;
  margin-top: 40px;
}



/* ポップアップ */

.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.65);
  z-index: 9999;
}

.popup-content {
  background: rgba(36,124,150,0.7);
  color: white;
  margin: 20% auto;
  padding: 30px;
  width: 85%;
  max-width: 420px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(100, 150, 255, 0.3);
}

.close {
  float: right;
  font-size: 22px;
  cursor: pointer;
}



.footer {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  line-height: 1.8;
}



/* スマホ用2列 */
@media (max-width: 768px) {
   .header-image img {
    opacity: 0.3; /* 好きな薄さに調整（0.2〜0.5くらい） */
  }

  .character-wrapper {
    display: block;
  }

  .main-list,
  .sub-list {
    width: 100%;
    max-width: 600px;
    grid-template-columns: 1fr; /* ← 1列にする */
   }
  
}
