/* ===== 共通 ===== */
body {
  font-family: sans-serif;
  background: #f5f5f5;
  margin: 0;
  padding: 10px;
}

#cardList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

/* ===== カード ===== */
.card {
  background: white;
  padding: 10px;
  border-radius: 12px;

  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0;

  /* ★ サイズ安定 */
  border: 3px solid transparent;
  box-sizing: border-box;
  overflow: hidden;

  /* ★ iOS安定 */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;

  /* ★ 重要：GPU系は全部禁止 */
  /* will-change: none; */
  /* transform: none; */
}

/* ===== 所持済み ===== */
.card.owned {
  border: 3px solid gold;
  background: #fff8dc;

  /* ★ box-shadow削除（iOSバグ原因） */
}

/* ===== 画像 ===== */
.card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;

  background: #f2f2f2;

  /* ★ GPU系禁止 */
  transform: none;
}

/* ===== タップ時安定 ===== */
.card:active {
  transform: none !important;
  opacity: 1 !important;
}

/* ===== テキスト ===== */
.card-name {
  font-size: 12px;
  text-align: center;
  margin-top: 5px;
}

.card-info {
  font-size: 11px;
  color: #666;
  font-weight: bold;
}

/* ===== 入力 ===== */
select, input {
  margin: 5px 5px 10px 0;
  padding: 5px;
}

/* ===== 検索 ===== */
#search {
  max-width: 300px;
  width: 100%;
}

/* ===== フィルター ===== */
.filter-top {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

#rarityFilter {
  width: 100px;
  padding: 6px;
}

/* ===== メニュー ===== */
#sideMenu {
  position: fixed;
  top: 0;
  left: -280px;
  width: 260px;
  height: 100%;
  background: #fff;
  transition: left 0.3s;
  z-index: 9998;
}

#sideMenu.open {
  left: 0;
}

#app {
  transition: transform 0.3s ease;
}

#app.shift {
  transform: translateX(260px);
}

#menuButton {
  position: fixed;
  top: 35px;
  left: 10px;
  z-index: 9999;
  font-size: 24px;
  cursor: pointer;
}

.header {
  margin-left: 50px;
}

/* ===== overlay ===== */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9997;
}

#overlay.active {
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(6px);
}

/* ===== 弾ステータス ===== */
.series-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.series-stat {
  background: #fff;
  color: #333;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid #ddd;
}

/* ===== モーダル ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  max-width: 300px;
  width: 90%;
}

.modal img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
}
