/* =========================
   ベース
========================= */
body {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f5f6fa;
  margin: 0;
  padding: 20px;
}

h1 {
  text-align: center;
  font-size: 22px;
  margin-bottom: 16px;
}



/* =========================
   フィルター（旧）
========================= */
.filter-area {
  text-align: center;
  margin-bottom: 10px;
}

.filter-btn {
  padding: 8px 14px;
  border-radius: 20px;
  border: none;
  margin: 0 4px;
  cursor: pointer;
  background: #dcdde1;
}

.filter-btn.active {
  background: #2f3640;
  color: white;
}

.sea-btn {
  background: #00a8ff;
  color: white;
}

.land-btn {
  background: #ff7675;
  color: white;
}



/* =========================
   🔍 検索（⭐横並び対応）
========================= */
.search-area {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 15px 0;
}

.search-area input {
  width: 260px;
  max-width: 70%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 16px;
}

button {
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

.clear-btn {
  background: #95a5a6;
}

.clear-btn:hover {
  opacity: 0.8;
}



/* =========================
   ⭐ グリッド（レスポンシブ強化）
========================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* タブレット */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ⭐ スマホ（1列） */
@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }

  body {
    padding: 12px;
  }

  .search-area input {
    max-width: 100%;
  }
}



/* =========================
   カード
========================= */
.card {
  background: white;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
  color: inherit;
}

.card:hover {
  transform: translateY(-4px);
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
}

.name {
  font-weight: bold;
  margin-top: 6px;
  font-size: 14px;
}

.price {
  color: #e74c3c;
  font-weight: bold;
}



/* =========================
   タグ
========================= */
.tag {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 999px;
  color: white;
  margin-right: 5px;
}



/* =========================
   ⭐ タグフィルタUI（スマホ神対応）
========================= */
.tag-filters {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;      /* 折り返さない */
  overflow-x: auto;       /* 横スクロール */
  padding-bottom: 6px;
  margin: 12px 0 20px;
}

.tag-filters::-webkit-scrollbar {
  display: none;
}

.filter-tag {
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  opacity: 0.6;
  color: white;
  flex-shrink: 0;
}

.filter-tag.active {
  opacity: 1;
  transform: scale(1.05);
}



/* =========================
   セクション
========================= */
.filter-section {
  margin: 10px 0 18px;
}

.section-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 6px;
  color: #555;
}

.loading {
  text-align: center;
  padding: 40px;
}



/* =========================
   個別タグ色
========================= */
.sea { background: #00a8ff; }
.land { background: #ff7675; }
.world { background: #ff7675; }
.adventure { background: #ff7675; }
.toon { background: #ff7675; }
.western { background: #ff7675; }
.critter { background: #ff7675; }
.fantasy { background: #ff7675; }
.tommorow { background: #ff7675; }
.port { background: #00a8ff; }
.mermaid { background: #00a8ff; }
.american { background: #00a8ff; }
.arabian { background: #00a8ff; }
.fantasysprings { background: #00a8ff; }
.mediterranean { background: #00a8ff; }
.mystery { background: #00a8ff; }
.lostriver { background: #00a8ff; }
