/* =========================================================
   cocoloni.jp「人気の占い」ゾーン
   既存CSSと衝突しないよう、すべて .cpf- で始まるクラスに限定
   ========================================================= */
.cpf {
  --cpf-green: #2F7A3B;
  --cpf-green-dark: #1F5A28;
  --cpf-green-pale: #EEF5EB;
  --cpf-line: #DCE8D8;
  --cpf-text: #1F2A1F;
  --cpf-sub: #4F5B4F;
  --cpf-coin-bg: #FFE27A;
  --cpf-coin-text: #5A3E00;
  --cpf-coin-edge: #D9A400;
  --cpf-free-bg: #C2410C;

  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px;
  color: var(--cpf-text);
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.6;
  box-sizing: border-box;
}
.cpf *, .cpf *::before, .cpf *::after { box-sizing: border-box; }

/* 見出し */
.cpf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--cpf-green);
}
.cpf-title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.cpf-count { font-size: 13px; color: var(--cpf-sub); }

/* グリッド：SPは2列、PCは幅に応じて3〜4列 */
.cpf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .cpf-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
}

/* カード */
.cpf-card { margin: 0; }
.cpf-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--cpf-line);
  border-radius: 14px;
  background: #FFFFFF;
  color: var(--cpf-text);
  text-decoration: none;
}
.cpf-link:hover .cpf-cta { background: var(--cpf-green-dark); }
.cpf-link:focus-visible {
  outline: 3px solid var(--cpf-green);
  outline-offset: 2px;
}

/* サムネイル */
.cpf-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--cpf-green-pale);
}
.cpf-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cpf-thumb-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--cpf-sub);
}

/* 訴求マーク：写真と本文の間の帯（顔に被らないよう写真の外に出す） */
.cpf-band {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 6px;
  font-size: clamp(11px, 3.2vw, 13px);
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  letter-spacing: 0.01em;
  /* マークの種類・コインマークの有無にかかわらず帯の高さを揃える */
  min-height: 35px;
}
.cpf-band-text { white-space: nowrap; }
.cpf-band--coin {
  background: var(--cpf-coin-bg);
  color: var(--cpf-coin-text);
  border-top: 1.5px solid var(--cpf-coin-edge);
  border-bottom: 1.5px solid var(--cpf-coin-edge);
}
.cpf-band--free {
  background: var(--cpf-free-bg);
  color: #FFFFFF;
}
.cpf-coin {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid var(--cpf-coin-edge);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: -0.04em;
}
.cpf-band--none {
  visibility: hidden;
  border-top: 1.5px solid transparent;
  border-bottom: 1.5px solid transparent;
}
.cpf-band--none::before {
  content: "";
  width: 18px;
  height: 18px;
}
/* 極端に狭い端末では2行折り返しを許可 */
@media (max-width: 340px) {
  .cpf-band-text { white-space: normal; }
}

/* 本文 */
.cpf-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 12px;
}
.cpf-service { font-size: 11px; color: var(--cpf-sub); }
.cpf-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}
.cpf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cpf-tag {
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--cpf-green-pale);
  color: var(--cpf-green-dark);
  font-size: 11px;
}
.cpf-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: auto;
  border-radius: 999px;
  background: var(--cpf-green);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  transition: background-color 0.15s ease;
}

/* もっと見る */
.cpf-more-wrap { display: flex; justify-content: center; margin-top: 18px; }
.cpf-more {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  min-height: 48px;
  border: 2px solid var(--cpf-green);
  border-radius: 999px;
  color: var(--cpf-green);
  font-weight: 700;
  text-decoration: none;
}
.cpf-more:hover { background: var(--cpf-green-pale); }
.cpf-more:focus-visible { outline: 3px solid var(--cpf-green); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .cpf-cta { transition: none; }
}
