@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: #f8f7ff;
  color: #333333;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #d8b4fe;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.15);
}

/* 見出し */
.deck-wrapper h2,
.deck-wrapper h3 {
  color: #cc0000;
}
.deck-wrapper h2 {
  background: #8b5cf6;
  color: #ffffff;
  padding: 20px;
  border-radius: 10px;
}

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

/* カード一覧・デッキエリア */
.card-area,
.deck-area {
  background: #ffffff;
  border: 1px solid #d8b4fe;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.08);
}

/* ボタン */
.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: #333333 !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: #f5f3ff;
  padding: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

/* ===== CHANNEL専用 ===== */

.card-channel {
  width: 220px;
}

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

/* ===== CHANNEL画像 ===== */

.card-channel .card-image {
  aspect-ratio: 88 / 63;
 overflow: visible;
}
.card-channel .card-image img {
  object-fit: contain;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  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: none;
}

/* 追加ボタン */
.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;
  }

}

/* ===== モーダルCHANNEL ===== */

.modal-channel {
  aspect-ratio: 88 / 63 !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(3, 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: contain;
  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;
}
/* ===== デッキ見出し ===== */

.deck-wrapper h3 {
  color: #7c3aed;
  border: 1px solid #d8b4fe;
  background: #f5f3ff;
  padding: 14px 18px;
  border-radius: 10px;
}

@media (max-width: 768px) {

.card-item {
  padding: 2px;
}

  .card-name {
    font-size: 9px !important;
    min-height: auto;
    margin-top: 2px;
    margin-bottom: 2px;
  }

  .add-btn {
    padding: 2px 6px;
    font-size: 12px;
  }

.card-channel {
  width: auto;
}

.deck-area {
  font-size: 70%;
}


}