/* カードリンクの下線を消す */
.card-link {
    text-decoration: none; 
    color: inherit;
}

.deck-container {
  position: relative;
  border: 3px solid #3B4CCA;
  border-radius: 8px;
  overflow: hidden;
  margin: 20px auto;
  width: 97%;
}

.deck-container img {
  display: block;
  width: 100%;
  height: auto;
}

.overlay-text {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 20px; /* 枠に合わせて小さく */
  padding: 2px 0;
  text-align: center;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.7);
  width: 100%;
}

.toc-container {
  color: #333;
  padding: 0 15px 0 40px;
  line-height: 1.4;
}

.toc-container li::marker {
  color: #007bff;
  font-size: 1.5em;
}

.toc-container li {
  margin-bottom: 3px;
}

.toc-container a {
  text-decoration: none;
  color: #333; /* 青文字 */
}

.toc-container a:active {
  color: #cccccc;
}

.deck-features {
  list-style-type: disc;
  color: #333;
  padding: 0 15px 0 25px;
  line-height: 1.4;
}

/* ドット（disc）の部分だけをカスタム */
.deck-features li::marker {
  color: #007bff;
  font-size: 1.5em;
}

.deck-features li {
  margin-bottom: 3px;
}

.key-card-table {
  width: 97%;
  margin: 0 auto;
  table-layout: fixed;
  border-collapse: collapse;
  color: #333;
}

.key-card-table img {
  width: 18vw;
}

.key-card-table th, 
.key-card-table td {
  border: 2px solid #ddd; /* 薄いグレーの枠線 */
  padding: 12px 0;      /* 中の余白 */
  vertical-align: middle;
}

.key-card-table th {
  width: 30%;
  background-color: #f2f2f2;
  font-weight: bold;
  text-align: center;
  word-wrap: break-word;
}

.key-card-table td {
  width: 70%;
  padding: 0 5px 0 25px;
  text-align: left;
  line-height: 1.5;
}

.key-card-description li::marker {
  color: #007bff;
  font-size: 1.5em;
}

.card-name {
  display: block;
  font-weight: bold;
  color: #333;
}

.how-to-play-list {
  color: #333;
  padding: 0 15px 0 40px;
  line-height: 1.5;
}

.how-to-play-list li::marker {
  color: #007bff;
  font-weight: bold;
  font-size: 1.2em;
}

.how-to-play-list li {
  margin-bottom: 3px;
}

/* デッキリストのグリッド設定 */
.deck-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 横に3等分 */
  gap: 0.25rem;
  padding: 10px;
  max-width: 900px;
  margin: 0 auto;
}

/* 各カードのコンテナ */
.deck-card {
  position: relative;
  text-align: center;
}

.deck-card img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

/* 枚数表示（右下にバッジ風に配置） */
.card-count {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: bold;
}

.tech-substitution-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 15px;
}

/* カードの大きさ（お好みで調整してください） */
.card-out, .card-in {
  position: relative;
  display: inline-block; /* 画像の幅に合わせる */
}

/* ラベル共通設定：画像の上に浮かせる */
.label-out, .label-in {
  position: absolute;
  top: 5px;       /* 画像の上から5px */
  left: 5px;      /* 画像の左から5px */
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  color: #fff;    /* 文字色を白に */
  z-index: 10;    /* 画像より前面に出す */
  box-shadow: 0 2px 4px rgba(0,0,0,0.3); /* 視認性を上げる影 */
}

/* OUT（赤） */
.label-out {
  background-color: rgba(231, 76, 60, 0.9);
}

/* IN（緑） */
.label-in {
  background-color: rgba(39, 174, 96, 0.9);
}


.card-out img, .card-in img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* 入れ替え行全体 */
.substitution-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fdfdfd;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

/* 画像と矢印のセット */
.substitution-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  width: 100%;
  padding-bottom: 0px; 
}

/* 説明文（カードのすぐ下） */
.substitution-desc {
  width: 100%;
  text-align: left;
  font-size: 0.95em;
  color: #333;
  line-height: 1.4;
  /* 点線を削除 */
  border-top: none; 
}

/* 矢印のサイズ */
.substitution-arrow {
  font-size: 32px;
  font-weight: bold;
  color: #3B4CCA;
}

.energy-table {
  width: auto;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  color: #333;
}


.energy-table th, 
.energy-table td {
  border: 1px solid #ddd;
  padding: 4px 10px;
  vertical-align: middle;
  font-weight: normal;
}

.energy-table th {
  background-color: #f2f2f2;
  text-align: center;
}

.energy-table td {
  text-align: left;
}

.energy-item {
  display: flex;
  align-items: center;
  justify-content: center;
}

.energy-icon {
  width: 18px;
  height: auto;
}