@charset "UTF-8";
/* =========================================================
   カテゴリーページ（恋愛運・仕事運・金運・相性・対人・総合・人生・今月の運勢）
   ヘッダー・フッター・背景は /common/common.css で管理
   カテゴリごとの色は config.php の bg / border / accent から
   --cat-bg / --cat-border / --cat-accent として渡しています
   ========================================================= */

.cat-page {
  --cat-text: #5b4a3a;
  --cat-heading: #4a3a2c;
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 16px 72px;
  color: var(--cat-text);
  font-family: "Kosugi Maru", sans-serif;
  line-height: 1.9;
  letter-spacing: 0.04em;
}

.cat-page *,
.cat-page *::before,
.cat-page *::after { box-sizing: border-box; }
.sp-only { display: none; }

.cat-page h1,
.cat-page h2 {
  font-family: "Zen Antique Soft", serif;
  color: var(--cat-heading);
  font-weight: 400;
  margin: 0;
}
.cat-page p { margin: 0; }
.cat-page ul { margin: 0; padding: 0; list-style: none; }
.cat-page a { color: inherit; text-decoration: none; }

/* ---------- タイトル ---------- */
.cat-heading {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 8px 16px;
  text-align: center;
  margin: 24px 0 20px;
}
.cat-heading__animal {
  width: 170px;
  height: auto;
  justify-self: end;
}
.cat-heading__animal.is-flip {
  justify-self: start;
  transform: scaleX(-1);
}
.cat-heading__text { padding-bottom: 14px; }
.cat-heading h1 {
  font-size: 34px;
  letter-spacing: 0.12em;
  line-height: 1.4;
}
.cat-heading__lead {
  grid-column: 1 / -1;
  font-size: 15px;
}

/* 英字ラベル（前にテーマ色のひし形） */
.cat-label {
  font-family: "Libre Baskerville", serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--cat-heading);
  margin-bottom: 4px !important;
}
.cat-label::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  background: var(--cat-accent);
  transform: rotate(45deg);
  vertical-align: 2px;
}

/* ---------- パンくず ---------- */
.cat-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 13px;
  margin-bottom: 24px;
}
.cat-breadcrumb a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 占いの一覧（主役のカード＝TOPのカードと同じ淡い地） ---------- */
.cat-section {
  background: var(--cat-bg);
  border: 1px solid var(--cat-border);
  border-radius: 18px;
  padding: 32px 32px 36px;
  margin-bottom: 36px;
}
.cat-section > h2,
.cat-others > h2 {
  position: relative;
  font-size: 22px;
  letter-spacing: 0.1em;
  line-height: 1.5;
  padding-left: 22px;
  margin-bottom: 20px;
}
.cat-section > h2::before,
.cat-others > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 10px;
  background: var(--cat-accent);
  transform: rotate(45deg);
}

.cat-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.cat-items li { display: flex; }

.cat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px 16px 12px;
  background: #fff;
  border: 1px solid var(--cat-border);
  border-radius: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}
a.cat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(91, 74, 58, 0.12);
}
.cat-item__thumb {
  flex-shrink: 0;
  width: 84px;
  height: auto;
}
.cat-item__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.cat-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cat-item__method,
.cat-item__soon {
  display: inline-block;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.9;
  letter-spacing: 0.08em;
}
.cat-item__method {
  background: var(--cat-bg);
  border: 1px solid var(--cat-border);
}
.cat-item__soon {
  background: #eee9e3;
  color: #8a7c70;
}
.cat-item__title {
  font-family: "Zen Antique Soft", serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--cat-heading);
}
.cat-item__lead {
  font-size: 13px;
  line-height: 1.7;
}
.cat-item__go {
  align-self: flex-end;
  margin-top: 2px;
  padding: 2px 14px;
  border-radius: 999px;
  background: var(--cat-accent);
  color: #4a3a2c;
  font-size: 12px;
  letter-spacing: 0.1em;
}

/* 準備中（リンクなし・控えめに） */
.cat-item.is-soon {
  background: rgba(255, 255, 255, 0.55);
  border-style: dashed;
}
.cat-item.is-soon .cat-item__thumb { opacity: 0.5; filter: grayscale(0.4); }
.cat-item.is-soon .cat-item__title,
.cat-item.is-soon .cat-item__lead { color: #9a8c80; }

/* まだ占いがひとつもないカテゴリ */
.cat-empty {
  padding: 28px 20px;
  background: #fff;
  border: 1px dashed var(--cat-border);
  border-radius: 14px;
  text-align: center;
}
.cat-empty__badge {
  display: inline-block;
  margin-bottom: 10px !important;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--cat-accent);
  color: #4a3a2c;
  font-size: 13px;
  letter-spacing: 0.1em;
}

/* ---------- ほかのテーマから探す ---------- */
.cat-others__list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.cat-others__list a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  padding: 12px 8px;
  background: var(--o-bg);
  border: 1px solid var(--o-border);
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.4;
  transition: transform 0.2s;
}
.cat-others__list a:hover { transform: translateY(-2px); }
.cat-others__list img { flex-shrink: 0; width: 24px; height: auto; }
.cat-others__back {
  margin-top: 24px !important;
  text-align: center;
  font-size: 14px;
}
.cat-others__back a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- TOPへ戻る ---------- */
.cat-totop {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--cat-accent, #ecc277);
  color: #4a3a2c;
  font-size: 20px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(91, 74, 58, 0.18);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.cat-totop.is-show { opacity: 1; visibility: visible; }

/* ---------- タブレット ---------- */
@media (max-width: 860px) {
  .cat-others__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- スマホ ---------- */
@media (max-width: 640px) {
  .sp-only { display: inline; }
  .cat-heading { gap: 6px; margin-top: 12px; }
  .cat-heading__animal { width: 72px; }
  .cat-heading__text { padding-bottom: 6px; }
  .cat-heading h1 { font-size: 19px; letter-spacing: 0.02em; white-space: nowrap; }
  .cat-heading__animal { width: 64px; }
  .cat-heading__lead { font-size: 14px; text-align: left; }
  .cat-heading__lead br { display: none; }

  .cat-section { padding: 24px 16px 26px; border-radius: 14px; }
  .cat-section > h2,
  .cat-others > h2 { font-size: 19px; }

  .cat-items { grid-template-columns: 1fr; gap: 12px; }
  .cat-item { padding: 14px 14px 14px 8px; gap: 10px; }
  .cat-item__thumb { width: 68px; }
  .cat-item__title { font-size: 16px; }

  .cat-others__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cat-others__list a { font-size: 14px; }
}
