@media screen and (max-width: 600px) {
  .deck-search-suggest-row {
    display: none !important;
  }
  .deck-search-block {
    width: 100% !important;
    margin: 0 0 24px 0 !important;
    padding: 8px !important;
    flex-direction: column !important;
    box-sizing: border-box;
  }
}
/* 色ボタンラベル・チェックボックス */
.deck-search-color-label {
  display: inline-block;
}
.deck-search-color-checkbox {
  display: none;
}
.color-icon-btn {
  padding: 4px 4px;
  border-radius: 6px;
  border: 2px solid #ccc;
  background: #fff;
  border-color: #ccc;
  cursor: pointer;
  user-select: none;
  font-size: 1.4em;
  display: inline-block;
  transition: background 0.2s, border-color 0.2s;
}
.color-icon-btn.active {
  background: #008080;
  color: #fff;
  border-color: #ccc;
}

/* 選択カード表示 */
.deck-search-selected-card {
  display: inline-block;
  position: relative;
  margin: 2px;
}
.deck-search-selected-card-img {
  width: 100px;
  height: 133px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 1px 4px #aaa;
}
.deck-search-selected-card-remove {
  position: absolute;
  top: 0;
  right: 0;
  background: #fff;
  border: none;
  color: #d00;
  font-size: 1.2em;
  cursor: pointer;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  line-height: 18px;
}

/* サジェスト */
.card-suggest-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  font-size: 0.93em;
}
.card-suggest-item-img {
  width: 28px;
  height: 38px;
  object-fit: cover;
  border-radius: 3px;
}

/* デッキリスト・カード外枠 */
.deck-list-cards {
  width: 100%;
}
.deck-list-card-outer {
  display: inline-block;
  vertical-align: top;
}

/* ページネーション */
.pagination-nav {
  text-align: center;
  margin: 18px 0;
}
.pagination {
  display: inline-flex;
  gap: 4px;
  list-style: none;
  padding: 0;
}
.pagination-link {
  padding: 6px 14px;
  border-radius: 5px;
  border: 1px solid #008080;
  text-decoration: none;
  font-weight: bold;
  background: #fff;
  color: #008080;
  transition: background 0.2s, color 0.2s;
}
.pagination-link.active,
.pagination-link.active:visited {
  background: #008080;
  color: #fff;
}
/* deck_search_block.css: 検索ブロックのスタイルを一元管理 */

.deck-search-block {
  width: 940px;
  margin: 0 auto 24px auto;
  padding: 16px;
  background: #f8f8f8;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.deck-search-block-section {
  box-sizing: border-box;
  background: transparent;
}
.deck-search-block-section-left {
  width: 340px;
  min-width: 260px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  justify-content: flex-start;
}
.deck-search-block-section-center {
  flex: 1 1 0;
  min-width: 320px;
  max-width: 650px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: flex-end;
  overflow-x: auto;
}

.deck-search-block-section-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}



.deck-search-color-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.deck-search-suggest-row {
  position: relative;
}

.deck-search-suggest-input {
  width: 300px;
  font-size: 0.95em;
  padding: 6px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.deck-search-suggest-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-top: none;
  z-index: 10;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  font-size: 0.95em;
}

.deck-search-reset-row {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.deck-search-reset-btn {
  padding: 6px 6px;
  font-size: 1em;
  border-radius: 4px;
  border: 1px solid #888;
  background: #eee;
  color: #222;
  font-weight: bold;
  cursor: pointer;
}

.deck-search-reset-btn:hover{
  background: #008080;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}

.deck-search-selected-card-area {
  width: 100%;
  min-height: 60px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: flex-end;
  overflow-x: auto;
}

/* デッキコード検索窓 */
.deck-id-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0px;
}
.deck-id-search-btn {
  padding: 4px 14px;
  border-radius: 6px;
  border: 1.5px solid #008080;
  background: #fff;
  color: #008080;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border 0.15s;
}
.deck-id-search-btn:hover {
  background: #008080;
  color: #fff;
}
#deck-id-search-input {
  font-size: 1.1em;
  text-align: center;
  border: 1.5px solid #aaa;
  border-radius: 5px;
  padding: 2px 6px;
  background: #f9f9f9;
  color: #222;
}
