/* ==========================================================================
   papamama navi — 画数早見表ページ
   /naming/strokes/ (page-naming-strokes-index.php)
   /naming/strokes/{n}/ (template-naming-strokes-detail.php)
   デザイントークン: tokens.css 準拠
   ========================================================================== */

/* ---- 共通カラー ---- */
.pmn-strokes,
.pmn-strokes-detail {
  --rate-daikichi-bg: #DCEFD9;
  --rate-daikichi-text: #2F7F2F;
  --rate-kichi-bg: #E7F4E5;
  --rate-kichi-text: #4A9F4A;
  --rate-shokichi-bg: #FCEEDB;
  --rate-shokichi-text: #B07A1E;
  --rate-hankichi-bg: #FAF1E0;
  --rate-hankichi-text: #B57A2F;
  --rate-kyo-bg: #FCE6DA;
  --rate-kyo-text: #C36A4A;
  --rate-daikyo-bg: #F4D1C4;
  --rate-daikyo-text: #A04A30;
}

/* ===== 早見表トップ /naming/strokes/ ===== */

.pmn-strokes {
  background: var(--pm-base);
  min-height: 60vh;
  padding-bottom: 3rem;
}

.pmn-strokes__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1rem;
}

.pmn-strokes__bc {
  padding: 1rem 0 0;
  font-size: 0.82rem;
  color: var(--pm-text-sub);
}
.pmn-strokes__bc a { color: var(--pm-text-sub); text-decoration: none; }
.pmn-strokes__bc a:hover { color: var(--pm-primary); }
.pmn-strokes__bc .sep { margin: 0 0.4rem; color: var(--pm-text-sub); }
.pmn-strokes__bc .here { color: var(--pm-text); font-weight: 500; }

/* Hero */
.pmn-strokes__hero {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}
.pmn-strokes__hero h1 {
  font-family: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--pm-text);
  margin: 0 0 0.8rem;
  line-height: 1.4;
}
.pmn-strokes__hero h1 .yr {
  display: block;
  font-size: 0.7em;
  color: var(--pm-primary);
  margin-top: 0.3em;
}
.pmn-strokes__hero p {
  color: var(--pm-text-sub);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
}

/* サマリーカード */
.pmn-strokes__summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.pmn-strokes__sum-card {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius-card, 16px);
  padding: 1.2rem;
}
.pmn-strokes__sum-card h3 {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.7rem;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  display: inline-block;
}
.pmn-strokes__sum-card.is-daikichi h3 { background: var(--rate-daikichi-bg); color: var(--rate-daikichi-text); }
.pmn-strokes__sum-card.is-kichi    h3 { background: var(--rate-kichi-bg);    color: var(--rate-kichi-text); }
.pmn-strokes__sum-card.is-kyo      h3 { background: var(--rate-kyo-bg);      color: var(--rate-kyo-text); }
.pmn-strokes__sum-card.is-daikyo   h3 { background: var(--rate-daikyo-bg);   color: var(--rate-daikyo-text); }
.pmn-strokes__sum-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.pmn-strokes__sum-nums a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.4rem;
  background: var(--pm-base);
  border: 1px solid var(--pm-border);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--pm-text);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s ease;
}
.pmn-strokes__sum-nums a:hover {
  border-color: var(--pm-primary);
  color: var(--pm-primary);
}

/* セクション見出し */
.pmn-strokes__h2 {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--pm-text);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--pm-border);
}
.pmn-strokes__note {
  color: var(--pm-text-sub);
  font-size: 0.85rem;
  margin: 0 0 1rem;
}

/* 1〜81 グリッド */
.pmn-strokes__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.5rem;
}
.pmn-strokes__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.3rem;
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.15s ease;
  text-align: center;
}
.pmn-strokes__cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.pmn-strokes__cell-n {
  font-family: 'Inter', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--pm-text);
  line-height: 1;
}
.pmn-strokes__cell-label {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
}
.pmn-strokes__cell-count {
  margin-top: 0.2rem;
  font-size: 0.65rem;
  color: var(--pm-text-sub);
}
.pmn-strokes__cell.is-daikichi .pmn-strokes__cell-label { background: var(--rate-daikichi-bg); color: var(--rate-daikichi-text); }
.pmn-strokes__cell.is-kichi    .pmn-strokes__cell-label { background: var(--rate-kichi-bg);    color: var(--rate-kichi-text); }
.pmn-strokes__cell.is-shokichi .pmn-strokes__cell-label { background: var(--rate-shokichi-bg); color: var(--rate-shokichi-text); }
.pmn-strokes__cell.is-hankichi .pmn-strokes__cell-label { background: var(--rate-hankichi-bg); color: var(--rate-hankichi-text); }
.pmn-strokes__cell.is-kyo      .pmn-strokes__cell-label { background: var(--rate-kyo-bg);      color: var(--rate-kyo-text); }
.pmn-strokes__cell.is-daikyo   .pmn-strokes__cell-label { background: var(--rate-daikyo-bg);   color: var(--rate-daikyo-text); }

/* 解説セクション */
.pmn-strokes__about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.pmn-strokes__about-card {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 16px;
  padding: 1.3rem;
}
.pmn-strokes__about-card h3 {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--pm-primary);
  margin: 0 0 0.6rem;
}
.pmn-strokes__about-card p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--pm-text);
  margin: 0;
}

/* 関連リンク */
.pmn-strokes__related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.pmn-strokes__related-card {
  display: block;
  padding: 1.2rem;
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.pmn-strokes__related-card:hover {
  border-color: var(--pm-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.pmn-strokes__related-card h3 {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--pm-text);
  margin: 0 0 0.4rem;
}
.pmn-strokes__related-card p {
  font-size: 0.82rem;
  color: var(--pm-text-sub);
  margin: 0;
  line-height: 1.5;
}

/* ===== 画数別個別ページ /naming/strokes/{n}/ ===== */

.pmn-strokes-detail {
  background: var(--pm-base);
  min-height: 60vh;
  padding-bottom: 3rem;
}
.pmn-strokes-detail__container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}
.pmn-strokes-detail__bc {
  padding: 1rem 0 0;
  font-size: 0.82rem;
  color: var(--pm-text-sub);
}
.pmn-strokes-detail__bc a { color: var(--pm-text-sub); text-decoration: none; }
.pmn-strokes-detail__bc a:hover { color: var(--pm-primary); }
.pmn-strokes-detail__bc .sep { margin: 0 0.4rem; }
.pmn-strokes-detail__bc .here { color: var(--pm-text); font-weight: 500; }

/* Hero */
.pmn-strokes-detail__hero {
  margin-top: 1rem;
  padding: 1.8rem 0;
  border-radius: 20px;
  background: var(--pm-surface);
}
.pmn-strokes-detail__hero.is-daikichi { background: linear-gradient(135deg, var(--rate-daikichi-bg) 0%, #FFFFFF 100%); }
.pmn-strokes-detail__hero.is-kichi    { background: linear-gradient(135deg, var(--rate-kichi-bg) 0%, #FFFFFF 100%); }
.pmn-strokes-detail__hero.is-shokichi { background: linear-gradient(135deg, var(--rate-shokichi-bg) 0%, #FFFFFF 100%); }
.pmn-strokes-detail__hero.is-hankichi { background: linear-gradient(135deg, var(--rate-hankichi-bg) 0%, #FFFFFF 100%); }
.pmn-strokes-detail__hero.is-kyo      { background: linear-gradient(135deg, var(--rate-kyo-bg) 0%, #FFFFFF 100%); }
.pmn-strokes-detail__hero.is-daikyo   { background: linear-gradient(135deg, var(--rate-daikyo-bg) 0%, #FFFFFF 100%); }

.pmn-strokes-detail__hero-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0 1.5rem;
}
.pmn-strokes-detail__hero-num {
  display: inline-flex;
  align-items: baseline;
  background: var(--pm-surface);
  padding: 0.6rem 1.2rem;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.pmn-strokes-detail__hero-num .n {
  font-family: 'Inter', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--pm-text);
  line-height: 1;
}
.pmn-strokes-detail__hero-num .suffix {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--pm-text-sub);
  margin-left: 0.3rem;
}
.pmn-strokes-detail__hero-meta { flex: 1; min-width: 200px; }
.pmn-strokes-detail__hero-meta h1 {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  font-weight: 700;
  color: var(--pm-text);
  margin: 0.5rem 0;
}
.pmn-strokes-detail__hero-meta h1 .sub {
  font-size: 0.7em;
  color: var(--pm-text-sub);
}
.pmn-strokes-detail__hero-meta p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--pm-text);
  margin: 0;
}

/* 吉凶バッジ */
.pmn-strokes-detail__rating-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Zen Maru Gothic', sans-serif;
}
.pmn-strokes-detail__rating-badge.is-daikichi { background: var(--rate-daikichi-bg); color: var(--rate-daikichi-text); }
.pmn-strokes-detail__rating-badge.is-kichi    { background: var(--rate-kichi-bg);    color: var(--rate-kichi-text); }
.pmn-strokes-detail__rating-badge.is-shokichi { background: var(--rate-shokichi-bg); color: var(--rate-shokichi-text); }
.pmn-strokes-detail__rating-badge.is-hankichi { background: var(--rate-hankichi-bg); color: var(--rate-hankichi-text); }
.pmn-strokes-detail__rating-badge.is-kyo      { background: var(--rate-kyo-bg);      color: var(--rate-kyo-text); }
.pmn-strokes-detail__rating-badge.is-daikyo   { background: var(--rate-daikyo-bg);   color: var(--rate-daikyo-text); }

.pmn-strokes-detail__rating-text {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-weight: 700;
}
.pmn-strokes-detail__rating-text.is-daikichi { color: var(--rate-daikichi-text); }
.pmn-strokes-detail__rating-text.is-kichi    { color: var(--rate-kichi-text); }
.pmn-strokes-detail__rating-text.is-shokichi { color: var(--rate-shokichi-text); }
.pmn-strokes-detail__rating-text.is-hankichi { color: var(--rate-hankichi-text); }
.pmn-strokes-detail__rating-text.is-kyo      { color: var(--rate-kyo-text); }
.pmn-strokes-detail__rating-text.is-daikyo   { color: var(--rate-daikyo-text); }

/* h2, h3 */
.pmn-strokes-detail__h2 {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--pm-text);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--pm-border);
}
.pmn-strokes-detail__h3 {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pm-text);
  margin: 1.5rem 0 0.7rem;
}

/* 解説カード */
.pmn-strokes-detail__about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}
.pmn-strokes-detail__about-card {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 14px;
  padding: 1.1rem;
  text-align: center;
}
.pmn-strokes-detail__about-card h3 {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--pm-text-sub);
  margin: 0 0 0.7rem;
}
.pmn-strokes-detail__about-card .big {
  font-family: 'Inter', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0.3rem 0;
  color: var(--pm-primary);
}
.pmn-strokes-detail__about-card p {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--pm-text);
  margin: 0.5rem 0 0;
}

/* 名前一覧 */
.pmn-strokes-detail__name-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.pmn-strokes-detail__name-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.8rem 0.5rem;
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.15s ease;
  text-align: center;
}
.pmn-strokes-detail__name-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border-color: var(--pm-primary);
}
.pmn-strokes-detail__name-card.is-boy { border-left: 3px solid #A8CDE8; }
.pmn-strokes-detail__name-card.is-girl { border-left: 3px solid #F5C2D1; }
.pmn-strokes-detail__name-card.is-unisex { border-left: 3px solid #C8B9E0; }
.pmn-strokes-detail__name-card .name-kanji {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--pm-text);
}
.pmn-strokes-detail__name-card .name-kana {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--pm-text-sub);
}

/* 関連画数 */
.pmn-strokes-detail__related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.pmn-strokes-detail__related-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0.3rem;
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.pmn-strokes-detail__related-card:hover {
  transform: translateY(-2px);
  border-color: var(--pm-primary);
}
.pmn-strokes-detail__related-card .rn {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pm-text);
}
.pmn-strokes-detail__related-card .rl {
  margin-top: 0.2rem;
  padding: 0.05rem 0.4rem;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 600;
}
.pmn-strokes-detail__related-card.is-daikichi .rl { background: var(--rate-daikichi-bg); color: var(--rate-daikichi-text); }
.pmn-strokes-detail__related-card.is-kichi    .rl { background: var(--rate-kichi-bg);    color: var(--rate-kichi-text); }
.pmn-strokes-detail__related-card.is-shokichi .rl { background: var(--rate-shokichi-bg); color: var(--rate-shokichi-text); }
.pmn-strokes-detail__related-card.is-hankichi .rl { background: var(--rate-hankichi-bg); color: var(--rate-hankichi-text); }
.pmn-strokes-detail__related-card.is-kyo      .rl { background: var(--rate-kyo-bg);      color: var(--rate-kyo-text); }
.pmn-strokes-detail__related-card.is-daikyo   .rl { background: var(--rate-daikyo-bg);   color: var(--rate-daikyo-text); }

.pmn-strokes-detail__related-link {
  text-align: center;
  margin: 0.8rem 0 0;
}
.pmn-strokes-detail__related-link a {
  color: var(--pm-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.pmn-strokes-detail__related-link a:hover { text-decoration: underline; }

/* Empty state */
.pmn-strokes-detail__names--empty {
  background: var(--pm-surface);
  padding: 2rem 1rem;
  border-radius: 12px;
  text-align: center;
  color: var(--pm-text-sub);
}

/* モバイル調整 */
@media (max-width: 640px) {
  .pmn-strokes__grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
  .pmn-strokes__cell { padding: 0.5rem 0.2rem; }
  .pmn-strokes__cell-n { font-size: 1.15rem; }
  .pmn-strokes-detail__hero-num { padding: 0.4rem 0.9rem; }
  .pmn-strokes-detail__hero-num .n { font-size: 2.6rem; }
}
