:root {
  --bg: #fdf4f8;            /* ヘッダーに合わせた淡いピンク */
  --surface: #ffffff;
  --ink: #574a53;           /* 文字（真っ黒は使わない・ややピンク寄り） */
  --ink-soft: #a58f9b;
  --rose: #e874a1;          /* アクセント（ヘッダーの明るいピンク） */
  --rose-deep: #cf5583;
  --rose-soft: #fbe3ee;
  --line: #f4dfe9;
  --mercari: #c96a6a;
  --mercari-bg: #fbecec;
  --yahoo: #6884c1;
  --yahoo-bg: #ecf0fa;
  --shadow-sm: 0 1px 3px rgba(120, 95, 108, 0.08);
  --shadow-md: 0 6px 20px rgba(120, 95, 108, 0.13);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN",
    "ヒラギノ丸ゴ ProN", "Rounded Mplus 1c", "Segoe UI", "Meiryo", sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

/* ---------- ヒーロー（Codex生成のピンク水彩バナー） ---------- */
.hero {
  background: url("assets/header-banner.jpg") center center / cover no-repeat, #f9dbe7;
  padding: 46px 20px;
  border-bottom: 1px solid var(--line);
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.site-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  color: #cf5583;
}
.site-eyebrow {
  margin: 4px 0 0;
  font-family: "Marcellus", serif;
  font-size: 0.66rem;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: #d98aa6;
}
.site-desc {
  margin: 12px 0 0;
  font-size: 0.78rem;
  line-height: 1.85;
  color: #9a7f8a;
}

/* ---------- レイアウト ---------- */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 14px 40px;
}

/* ---------- 検索ボックス ---------- */
.search-wrap { margin: 0 0 16px; }
.search-box {
  width: 100%;
  padding: 14px 22px;
  font-size: 1rem;
  border: none;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  outline: none;
  font-family: inherit;
  color: var(--ink);
}
.search-box::placeholder { color: #c6bcc2; }
.search-box:focus { box-shadow: 0 0 0 2px var(--rose-soft), var(--shadow-sm); }

/* ---------- 絞り込みチップ ---------- */
.filters {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 14px;
}
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  padding-left: 4px;
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.08s ease, background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { border-color: var(--rose); }
.chip:active { transform: scale(0.95); }
.chip.active {
  background: var(--rose);
  border-color: var(--rose);
  color: #fff;
  box-shadow: 0 2px 8px rgba(217, 125, 151, 0.4);
}
.chip .chip-count { font-size: 0.7rem; opacity: 0.6; margin-left: 4px; }
.chip.active .chip-count { opacity: 0.85; }
.chip-hidden { display: none; }
.chips-expanded .chip-hidden { display: inline-flex; }
.chip-toggle {
  background: var(--rose-soft);
  color: var(--rose-deep);
  border-color: transparent;
  font-weight: 600;
}
/* 名前グループは値が多いので少し詰める */
.filter-group-name .chips { gap: 6px; }

/* ---------- ツールバー ---------- */
.toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 0 4px;
}
.count { font-size: 0.85rem; color: var(--ink-soft); white-space: nowrap; }
.count strong { color: var(--rose-deep); font-size: 1.15rem; font-weight: 700; }
.reset-btn {
  border: none;
  background: transparent;
  color: var(--rose-deep);
  padding: 4px 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

/* ---------- 適用中の絞り込みバー ---------- */
.active-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
  padding: 0 2px;
}
.active-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--rose-soft);
  color: var(--rose-deep);
  padding: 5px 8px 5px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.active-tag .x {
  font-size: 0.9rem;
  line-height: 1;
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(193, 95, 124, 0.18);
}
.active-tag:hover .x { background: rgba(193, 95, 124, 0.32); }

/* ---------- カード（きっちり揃った格子・写真は白フチで額装） ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 13px;
  align-items: stretch;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 18px;
  padding: 8px;               /* 写真のまわりの白フチ（額装） */
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card:active { transform: scale(0.985); }

.thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f4edf0;
  border-radius: 12px;        /* 写真の角も丸く */
  overflow: hidden;
}
.thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c8bcc3;
  font-size: 0.82rem;
  font-weight: 500;
  background: #f2eaee;
}
.badge {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(90, 70, 80, 0.15);
}
.badge-mercari { background: #fff; color: var(--mercari); }
.badge-yahoo { background: #fff; color: var(--yahoo); }

.card-body {
  padding: 10px 6px 5px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;                     /* カードの高さを揃える */
}
.card-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.meta-tag {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--rose-deep);
  background: var(--rose-soft);
  padding: 2px 8px;
  border-radius: 999px;
}
.meta-tag.size { color: #8a76c0; background: #efe9f9; }
.card-title {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;       /* 2行で高さを揃える（全文はタップ/ホバーで表示） */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-price {
  margin-top: auto;            /* 価格を下端にそろえる */
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rose-deep);
}
.card-price .yen { font-size: 0.72rem; font-weight: 600; margin-right: 1px; }

/* ---------- 空表示 ---------- */
.empty { text-align: center; padding: 44px 20px; color: var(--ink-soft); }
.empty p { margin: 6px 0; }
.empty-hint { font-size: 0.85rem; }

/* ---------- もっと見る ---------- */
.more-wrap { text-align: center; margin-top: 24px; }
.more-btn {
  background: var(--surface);
  color: var(--rose-deep);
  border: 1.5px solid var(--rose);
  padding: 12px 46px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s, color 0.15s;
}
.more-btn:hover { background: var(--rose); color: #fff; }
.more-btn:active { transform: scale(0.97); }

/* ---------- フッター ---------- */
.site-footer {
  text-align: center;
  padding: 28px 16px 40px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  margin-top: 36px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(251,225,234,0.25), var(--bg));
}
.footer-sub {
  font-family: "Marcellus", serif;
  font-size: 0.64rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--rose);
  margin-top: 8px;
}

/* ---------- レスポンシブ（列数） ---------- */
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .site-title { font-size: 1.75rem; }
  .site-desc { font-size: 0.86rem; }
  .filters { flex-direction: row; flex-wrap: wrap; gap: 18px; }
  .filter-group { flex: 1 1 auto; min-width: 210px; }
}
@media (min-width: 880px) {
  .grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .hero { min-height: 230px; }
  .site-title { font-size: 2rem; }
}
@media (min-width: 1140px) {
  .grid { grid-template-columns: repeat(5, 1fr); }
}
