/* PLAYボタンの表示切替 */
.play-btn-pc { display: inline-block; }
.play-btn-mobile { display: none; }
@media (max-width: 600px) {
  .play-btn-pc { display: none !important; }
  .play-btn-mobile { display: none !important; }
}
@media (max-width: 600px) {
  #pc-action-buttons,
  .deck-action-buttons#pc-action-buttons {
    display: none !important;
  }
}
@media (min-width: 601px) {
  .deck-list-grid-card,
  .deck-list-card {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
  }
}
@media (min-width: 601px) {
  .deck-color-symbols {
    position: absolute;
    top: 8px;
    right: -275px;
    z-index: 20;
    display: flex;
    gap: 4px;
    align-items: center;
  }
}
@media (max-width: 600px) {
  .deck-color-symbols {
    position: absolute !important;
    top: 3px !important;
    right: 12px !important;
    z-index: 20 !important;
    display: flex !important;
    gap: 4px !important;
    align-items: center !important;
    font-size: 10px;
  }
}
@media (min-width: 601px) {
  .mana-curve-abs-block {
    position: absolute;
    top: 80px;
    right: 10px;
    z-index: 10;
    width: auto;
  }
}
/* スマホ用プロフィール画像配置（PCと同じスタイルを一度適用） */
@media (max-width: 600px) {
  .deck-profile-img-sp {
    position: absolute;
    left:8px;
    top: 2px;
    z-index: 30;
    display: block;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    border: 2px solid #fff;
    background: #eee;
  }
  .deck-profile-img-sp-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }
}
/* PC用プロフィール画像配置 */
@media (min-width: 601px) {
  .deck-profile-img-pc {
    position: absolute;
    left: 11px;
    top: 146px;
    z-index: 30;
    display: block;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    border: 2px solid #fff;
    background: #eee;
  }
  .deck-profile-img-pc-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }
}
/* deck_create.php カードリスト部の表示スタイル統一 */
.deck-list-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 3px;
  margin-bottom: 3px;
  width: 100%;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}
.deck-list-grid-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin: 0;
  padding: 0;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
}
.card-hover-wrap {
  width: 100%;
  box-sizing: border-box;
  display: block;
  margin: 0;
  padding: 0;

.deck-list-card-btns { display: none !important; }
.deck-list-grid-card:hover .deck-list-card-btns { display: none !important; }
.deck-list-card-btns button { display: none !important; }
    max-height: 250px !important;
  }

@media (max-width: 600px) {
  #mobile-action-buttons {
    display: flex !important;
    position: static !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    justify-content: center !important;
    align-items: center !important;
  gap: 4px !important;
    background: rgba(255,255,255,0.98) !important;
    z-index: auto !important;
    padding: 10px 0 10px 0 !important;
    box-shadow: none;
    border-top: 1px solid #ddd;
    margin-top: 12px !important;
    margin-bottom: 12px !important;
  }
}
@media (min-width: 601px) {
  #mobile-action-buttons {
    display: none !important;
  }
}
/* PC用: デッキ名直下にイベント名 */
.deck-event-title-bar-pc {
  display: block;
  position: static;
  margin: 4px 0 0 0;
  font-size: 15px;
  color: #fff;
  font-weight: bold;
  padding: 3px 5px;
  letter-spacing: 0.5px;
  text-align: left;
  background-color: #222;
  border-radius: 7px;
  min-width: 80px;
}
@media (max-width: 600px) {
  .deck-event-title-bar-pc {
    display: none !important;
  }
  .deck-event-title-bar {
    display: block !important;
    position: absolute !important;
    top: 105px !important;
    left: -55px !important;
    margin: 0 auto !important;
    max-width: 200px !important;
    min-width: 0 !important;
    font-size: 11px !important;
    color: #fff !important;
    font-weight: bold !important;
    background: #000 !important;
    padding: 2px 12px !important;
    border-radius: 8px !important;
    letter-spacing: 0.5px !important;
    text-align: center !important;
    z-index: 330 !important;
  }
}
@media (max-width: 600px) {
  .container {
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
/* デッキ名入力フォーム（deck_create.php用） */
.deck-title-input-large {
  width: 340px;
  font-size: 24px;
  height: 48px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #aaa;
  box-sizing: border-box;
}

.deck-info-area-with-bg {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.header,
#header {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
@media (max-width: 600px) {
  .mana-curve-abs-block,
  .mana-curve-title {
    display: none !important;
  }
}
#mobile-action-buttons {
  margin-top: 7px !important;
  margin-bottom: 7px !important;
}
.deck-list-cards {
  display: grid;
  grid-template-columns: repeat(1, 1fr) !important; /* 4→6列に拡大 */
  gap: 4px !important;
  justify-content: center;
  margin: 0 auto;
  text-align: center;
  border-radius: 16px;
}
.deck-list-cards .card-item {
  margin: 0 auto;
}
/* デッキ詳細エリア：右側に背景画像ブロックを表示する新レイアウト */
.deck-info-area-with-bg {
  width: 100%;
  min-height: 200px;
  border-radius: 16px;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  position: relative;
  background: #000;
  margin-bottom: px;
  overflow: hidden;
  background-position: left top;
}
.deck-info-main {
  flex: 1 1 0%;
  min-width: 0;
  flex-basis: 0;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  color: #fff;
  z-index: 1;
  min-height: 120px;
.deck-title {
  font-size: 2.1em;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.45), 0 1px 0 #222;
  line-height: 1.2;
  margin-bottom: 2px;
}
}
.deck-info-bg-block {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  height: 100%;
  background-size: cover;
  clip-path: polygon(30px 0, 100% 0, 100% 100%, 0 100%);
  background-position: top center;
  background-repeat: no-repeat;
  border-radius: 0 16px 16px 0;
  box-shadow: 0px 0px 32px 0 #000;
  z-index: 0;
  position: relative;
  /* background-image指定はstyle.cssで一元管理 */
}




.deck-status-block {
  position: absolute;
  top: 158px;
  right: -275px;
  display: flex;
  align-items: center;
  gap: 4px !important;
  z-index: 10;
  box-shadow: 0 4px 16px 0 rgba(0,0,0,0.45);
  border-radius: 18px;
  padding: 6px 12px;
  background: rgba(32,32,32,0.82);
  /* deck-info-area-with-bgの右上に必ず重なる */
}
.like-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px !important;
}
.like-btn > i {
  color: #fff;
  transition: color 0.2s;
}
.like-btn > i.liked {
  color: #e44;
}
.like-btn .like-count {
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  text-shadow: 0 0 4px #333;
  margin-left: 2px;
}
.deck-status-block .view-count {
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  text-shadow: 0 0 4px #333;
  display: flex;
  align-items: center;
  gap: 4px !important;
}
.deck-status-block .view-count i {
  font-size: 1em;
  margin-right: 2px;
}
/* デッキブロックタイトル（Main Deck, Sideboard, Maybe） */
.deck-block-title {
  font-size: 20px;
  font-weight: bold;
  color: #008080;
  margin-bottom: 8px;
}
.deck-card-label {
  height: 26px;
  line-height: 26px;
  color: #333;
  font-size: 14px;
  font-weight: bold;
  text-align: left;
  width: 100%;
  letter-spacing: 0.04em;
  padding-left: 4px;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
}
.no-deck-message {
  padding: 32px 0 32px 0;
  text-align: center;
  color: #888;
  font-size: 1.1em;
}
.card-count-badge {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 0px);
  background: #111;
  color: #fff;
  border-radius: 50%;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  z-index: 5;
  border: 2px solid #fff;
  box-shadow: 2px 2px 3px rgba(0,0,0,0.2);
  pointer-events: none;
}
/* デッキ詳細エリアの背景・高さ・角丸・配置・テキスト装飾 */
.deck-info-area {
  width: 100%;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  font-size: 1.4em;
  font-weight: bold;
  text-shadow: 0 0 8px #000, 0 0 2px #fff;
  background-position: right -80px top -80px;
  background-repeat: no-repeat;
  background-color: #333;
  padding: 8px !important;
}
.deck-block {
  margin-bottom: 12px;
}
/* Maybeエリア専用のカード画像サイズ・グリッド */
.deck-block-maybe .deck-card-images {
  grid-template-columns: repeat(8, 1fr);
}
.deck-block-maybe .deck-card-img {
  width: 100px;
  max-width: 100%;
  height: auto;
}
/* デッキ内容ブロックの枠線を非表示に */
.deck-block {
  border: none !important;
  box-shadow: none !important;
  background: none;
}
/* デッキ操作ボタン共通デザイン */
.deck-action-buttons {
  display: flex;
  margin-bottom: 0px;
  justify-content: center;
  align-items: center;
  gap: 4px !important;
}
.deck-action-btn,
.deck-action-btn:link,
.deck-action-btn:visited {
  display: inline-block;
  background: #333;
  color: #fff !important;
  border: none;
  border-radius: 8px;
  padding: 4px 4px;
  width: 70px;
  height: 28px;
  font-size: 0.8em;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  line-height: 20px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  box-sizing: border-box;
  vertical-align: middle;
}
.deck-action-btn:hover {
  background: #008080;
  color: #fff !important;
  text-decoration: none;
}
.deck-action-btn:hover {
  background: #008080;
  color: #fff;
}
.deck-card-img-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.deck-card-img-wrap .card-detail-btn {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
}
.deck-card-img-wrap:hover .card-detail-btn {
  opacity: 1;
  pointer-events: auto;
}

.card-detail-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 48px;
  min-height: 32px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  background: rgba(0,0,0,0.7);
  border: 2px solid #fff;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 2px 8px #0003;
  transition: background 0.15s, opacity 0.18s;
}
.card-detail-btn:hover {
  background: #008080;
}
.card-detail-btn:active {
  background: rgba(0,0,0,0.9);
}
.deck-content-area {
  width: 100%;
  padding: 20px 16px;
  box-sizing: border-box;
  border-radius: 16px;
}
/* カード画像を1行5枚・幅140pxに */
.deck-card-images {
  display: grid;
  grid-template-columns: repeat(5, 1fr) !important; /* 6列 */
  gap: 4px !important;
  margin-bottom: 16px;
}
.deck-card-img, .card-img {
  width: 160px !important;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 2px 2px 8px #0003;
  background: #fff;
  justify-self: center;
  transition: box-shadow 0.18s, transform 0.18s;
}
.deck-card-img:hover, .card-img:hover {
  box-shadow: 0 8px 24px #0005;
  transform: scale(1.04);
}
.deck-info-area {
  width: 100%;
  /* background: #333; 削除: 背景画像優先 */
  color: #fff;
  padding: 20px 16px;
  box-sizing: border-box;
  margin-bottom: 12px;
  border-radius: 16px;
}
.deck-list-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 4px !important;
  border-radius: 16px;
}
/* 1行6枚表示を徹底 */
.deck-list-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 0px;
  margin-bottom: 3px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  padding: 0;
}
.deck-list-card.has-bg .deck-list-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  opacity: 0.18;
  z-index: 0;
  border-radius: 16px !important;
}
.deck-list-card-title {
  position: relative;
  z-index: 1;
  padding: 12px 16px 0 16px;
  font-size: 16px !important; /* デッキ名のフォントサイズを明示的に指定・強制 */
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deck-list-card-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 4px !important;
  padding: 0 16px;
  font-size: 0.98em;
}
.deck-list-card-meta .like-btn {
  background: none;
  border: none;
  cursor: pointer;
  .deck-color-indicator {
    width: 90vw !important;
    max-width: 90vw !important;
    min-width: 0 !important;
    margin: 0 auto 6px auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: auto !important;
    transform: scale(0.95);
    font-size: 0.95em;
  }
  padding: 0;
  display: flex;
  align-items: center;
}
.deck-list-card-meta .bi-heart-fill {
  color: #e44;
}
.deck-list-card-info {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 4px !important;
  padding: 0 16px 12px 16px;
  font-size: 0.95em;
  color: #555;
}
.deck-list-card-color {
  font-weight: bold;
}
.deck-list-card-auther {
  margin-left: auto;
}

/* ========================= */
/* スマホ対応（レスポンシブ） */
@media screen and (max-width: 600px) {
  .container {
    max-width: 100vw !important;
    width: 100vw !important;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  /* .deck-list-cards スタイルは style.css を優先 */
  .deck-info-area-with-bg {
    flex-direction: column;
    min-height: unset;
    border-radius: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    top: 0 !important;
    transform: none !important;
    position: static !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    background-position: left top !important;
  }
  .deck-info-main {
    padding: 10px 6px;
    min-height: unset;
  }
  .deck-info-bg-block {
    width: 100vw !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    height: 120px !important;
    border-radius: 0 !important;
    clip-path: none !important;
    margin: 0 !important;
    padding: 0 !important;
    left: 0 !important;
    top: 0 !important;
    position: static !important;
  }
  .deck-status-block {
    position: static;
    flex-direction: row;
    justify-content: flex-start;
    margin-bottom: 8px;
    box-shadow: none;
    background: rgba(32,32,32,0.92);
    padding: 4px 8px;
  }
  .deck-title {
    font-size: 1.2em;
    margin-bottom: 2px;
  }
  .deck-list-cards {
    display: grid;
    grid-template-columns: 1fr;
  gap: 4px !important;
    max-width: 100vw;
  }
  .deck-content-area {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    box-sizing: border-box;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow-x: auto;
  }
  .deck-tab-content {
    width: calc(100vw - 4px) !important;
    max-width: calc(100vw - 4px) !important;
    min-width: 0 !important;
    box-sizing: border-box;
    overflow-x: auto;
      }
  .deck-card-images {
    display: grid;
  grid-template-columns: repeat(5, 1fr) !important;
    gap: 1px !important;
      margin-bottom: 8px;
      width: 100% !important;
      max-width: 100% !important;
      box-sizing: border-box;
      overflow-x: hidden;
  }
    .deck-card-img, .card-img {
      width: 100% !important;
      min-width: 0;
      max-width: 100%;
      border-radius: 6px;
      box-sizing: border-box;
      display: block;
      margin: 0 auto;
    }
  /* .deck-list-card のスマホ専用グリッド化・幅指定を削除し、PCと同じflex/width:280pxに統一 */
  .deck-list-card-title {
    font-size: 1em !important;
    padding: 8px 8px 0 8px;
  }
  .deck-list-card-meta, .deck-list-card-info {
    padding: 0 8px 8px 8px;
    font-size: 0.95em;
  }
  /* 重複定義削除済み */
  .deck-block-maybe .deck-card-img {
    width: 20vw !important;
    max-width: 20vw;
  }
  .deck-content-area {
    padding: 8px 2px;
  }
  .deck-block-title {
    font-size: 1em;
    margin-bottom: 4px;
  }
  .deck-card-label {
    font-size: 12px;
    height: 20px;
    line-height: 20px;
    display: none !important;
  }
}
@media screen and (max-width: 600px) {
  .container {
    padding: 0px !important;
  }
  .tab-content {
    padding: 2px !important;
    text-align: center !important;
  }
  .user-card-block-sp {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    padding: 0px !important;
    margin-top: 12px;
    margin-bottom: 16px;
    text-align: center !important;
  }
  .userpage-left {
    display: none !important;
  }
}
.deck-list-card-img {
    width: 100px !important;
    height: auto !important;
    border-radius: 7px;
    display: block;
    margin: 0 auto;
}
