@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}
/* ===== デッキツール：バトル系（グラデーション無し） ===== */

.deck-wrapper {
  background: #140000;
  color: #ffffff;
  padding: 25px;
  border-radius: 12px;
  border: 2px solid #880000;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

/* 見出し */
.deck-wrapper h2,
.deck-wrapper h3 {
  color: #cc0000;
}

/* 検索ボックス */
.deck-search {
  background: #220000;
  color: #ffffff;
  border: 1px solid #880000;
}

/* カード一覧・デッキエリア */
.card-area,
.deck-area {
  background: #1a0000;
  border: 1px solid #880000;
  padding: 15px;
  border-radius: 8px;
}

/* ボタン */
.deck-wrapper button {
  background: #880000;
  border: none;
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}

.deck-wrapper button:hover {
  background: #aa0000;
  transform: scale(1.05);
}
.deck-wrapper .card-name {
  color: #ffffff !important;
}

/* カード一覧グリッド */
#cardList {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}



/* ===== カードグリッド ===== */

#cardList {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  #cardList {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== カード本体 ===== */

.card-item {
  border: 2px solid #880000;
  border-radius: 8px;
  background: #140000;
  padding: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

/* 画像ラッパー（63:88固定） */
.card-image {
  aspect-ratio: 63 / 88;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 6px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* カード名 */
.card-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  min-height: 2.4em;
  line-height: 1.2;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

/* 追加ボタン */
.add-btn {
  background: #880000;
  border: none;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}

.add-btn:hover {
  background: #aa0000;
  transform: scale(1.05);
}

@media (max-width: 768px) {

  #cardList {
    grid-template-columns: repeat(3, 1fr);
  }

  .deck-wrapper .card-name {
    font-size: 10px !important;
  }

}



/* ===== カード一覧デザイン ===== */

.card-item {
  text-align: center;
}

.card-image img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.card-name {
  font-size: 14px;
  margin-top: 6px;
  margin-bottom: 6px;
  font-weight: 600;
  color: #222;
}

.add-btn {
  padding: 4px 10px;
  font-size: 14px;
  cursor: pointer;
}
#cardList {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  #cardList {
    grid-template-columns: repeat(2, 1fr);
  }
}


.card-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.card-modal.active {
  display: flex;
}

.modal-content {
  background: #140000;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  border: 2px solid #880000;
}

.modal-content img {
  width: 100%;
  aspect-ratio: 63 / 88;
  object-fit: cover;
  border-radius: 8px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 28px;
  cursor: pointer;
  color: #fff;
}
/* モーダル内テキストを強制白 */

#modalName,
#modalDetail {
  color: #ffffff !important;
}

#modalDetail {
  white-space: pre-line; /* \n を改行に反映 */
  line-height: 1.6;
}
/* モーダル内カード名を強制スタイル */

#modalName {
  background: #000000 !important;
  color: #ffffff !important;
  padding: 10px;
  margin-top: 12px;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}