@charset "utf-8";
/* ============================================================
   月別ページの料金比較UI（/monthly/october|november|december/）
     .mr … ネクストおすすめ枠（inc/common/monthly-recommend.php）
     .mc … 料金比較UI（inc/common/monthly-compare.php）
   css/monthly.css と併読する。変数は guide-common.css の :root。
   モバイルファースト。768px 以上で段組みを増やす。
   ============================================================ */

/* ---------- ネクストおすすめ枠 ---------- */
.mr {
  display: grid;
  gap: 16px;
}

.mr-card {
  padding: 18px 16px;
  border: 1px solid var(--guide-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(45, 52, 54, 0.06);
}

.mr-card--group {
  border-color: rgba(217, 169, 0, 0.45);
  background: linear-gradient(180deg, var(--guide-gold-pale) 0%, #fff 42%);
}

.mr-card__eyebrow {
  margin: 0 0 4px;
  color: var(--guide-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.mr-card__name {
  margin: 0 0 8px;
  font-size: 1.18rem;
  line-height: 1.4;
}

.mr-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.mr-card__lead {
  margin: 0 0 12px;
  font-size: 0.92rem;
  line-height: 1.8;
}

.mr-card__campaign {
  display: grid;
  gap: 2px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--guide-soft);
}

.mr-card__campaign-name {
  font-size: 0.9rem;
  font-weight: 800;
}

.mr-card__campaign-period {
  color: var(--guide-muted);
  font-size: 0.8rem;
}

.mr-card__price {
  display: grid;
  gap: 2px;
  margin: 0 0 14px;
}

.mr-card__price-label {
  color: var(--guide-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.mr-card__price-amount {
  color: var(--guide-orange-deep);
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.2;
}

.mr-card__price-note {
  color: var(--guide-muted);
  font-size: 0.76rem;
}

.mr-card__actions {
  margin: 0 0 10px;
}

.mr-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--guide-orange-deep);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.mr-card__cta:hover { opacity: 0.92; }
.mr-card__cta:focus-visible { outline: 3px solid var(--guide-orange-deep); outline-offset: 2px; }

.mr-card__schools > summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
}

.mr-card__school-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.mr-card__school-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--guide-border);
  font-size: 0.9rem;
}

.mr-card__school-pref {
  color: var(--guide-muted);
  font-size: 0.78rem;
}

/* ---------- バッジ（おすすめ枠と比較カードで共用） ---------- */
.mc-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.5;
}

.mc-badge--recommend {
  background: var(--guide-orange-deep);
  color: #fff;
}

.mc-badge--campaign {
  background: var(--guide-gold-pale);
  border: 1px solid rgba(217, 169, 0, 0.6);
  color: var(--guide-gold-dark);
}

.mc-badge--kokoro {
  background: #e6f7f1;
  border: 1px solid #9fd9c4;
  color: #1f6f56;
}

/* ---------- 比較UI 全体 ---------- */
.mc {
  margin-top: 18px;
}

.mc-controls {
  position: relative;
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

/* タブ：4つを一度に認識できるよう横スクロールにしない（狭い画面では2×2） */
.mc-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mc-tab {
  display: grid;
  gap: 1px;
  padding: 10px 6px;
  border: 1px solid var(--guide-border);
  border-radius: 12px;
  background: #fff;
  color: var(--guide-ink);
  font-family: inherit;
  cursor: pointer;
}

.mc-tab__label {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.4;
}

.mc-tab__count {
  color: var(--guide-muted);
  font-size: 0.74rem;
}

.mc-tab.is-active {
  border-color: var(--guide-orange-deep);
  background: var(--guide-orange-deep);
  color: #fff;
}

.mc-tab.is-active .mc-tab__count { color: rgba(255, 255, 255, 0.86); }
.mc-tab:focus-visible { outline: 3px solid var(--guide-orange-deep); outline-offset: 2px; }

.mc-regions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mc-region {
  padding: 6px 12px;
  border: 1px solid var(--guide-border);
  border-radius: 999px;
  background: #fff;
  color: var(--guide-ink);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.mc-region.is-active {
  border-color: var(--guide-ink);
  background: var(--guide-ink);
  color: #fff;
}

.mc-region:focus-visible { outline: 3px solid var(--guide-orange-deep); outline-offset: 2px; }

.mc-groupfilter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(217, 169, 0, 0.6);
  border-radius: 10px;
  background: var(--guide-gold-pale);
  font-size: 0.84rem;
  font-weight: 700;
}

.mc-groupfilter[hidden] { display: none; }

.mc-groupfilter__clear {
  padding: 4px 10px;
  border: 1px solid var(--guide-gold-dark);
  border-radius: 999px;
  background: #fff;
  color: var(--guide-gold-dark);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.mc-status {
  margin: 0;
  color: var(--guide-muted);
  font-size: 0.84rem;
  line-height: 1.7;
}

/* ---------- 比較カード ---------- */
.mc-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mc-card {
  display: grid;
  gap: 6px;
  padding: 14px 14px 12px;
  border: 1px solid var(--guide-border);
  border-radius: 14px;
  background: #fff;
}

.mc-card[hidden] { display: none; }

.mc-card--recommend {
  border-color: rgba(194, 81, 40, 0.4);
  box-shadow: 0 0 0 1px rgba(194, 81, 40, 0.12) inset;
}

.mc-card__pref {
  margin: 0;
  color: var(--guide-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.mc-card__name {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.45;
}

.mc-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.mc-card__prices { margin: 2px 0 0; }
.mc-price[hidden] { display: none; }

.mc-price__cat {
  margin: 0 0 2px;
  color: var(--guide-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.mc-price__amount {
  margin: 0;
  color: var(--guide-orange-deep);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.25;
}

.mc-price__amount--formula,
.mc-price__amount--check {
  color: var(--guide-ink);
  font-size: 1.02rem;
  line-height: 1.5;
}

.mc-price__amount--none {
  color: var(--guide-muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.mc-price__plan {
  margin: 4px 0 0;
  color: var(--guide-muted);
  font-size: 0.78rem;
  line-height: 1.65;
}

.mc-price__note {
  margin: 6px 0 0;
  color: var(--guide-muted);
  font-size: 0.78rem;
  line-height: 1.65;
}

.mc-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--guide-soft);
  border: 1px solid var(--guide-border);
  color: var(--guide-ink);
  font-size: 0.7rem;
  font-weight: 800;
}

.mc-card__cond {
  margin: 2px 0 0;
  font-size: 0.8rem;
}

.mc-card__cond > summary {
  cursor: pointer;
  color: var(--guide-gold-dark);
  font-weight: 800;
}

.mc-card__cond p {
  margin: 6px 0 0;
  color: var(--guide-muted);
  line-height: 1.7;
}

.mc-card__cond[hidden],
.mc-card__cond-hidden { display: none; }

.mc-card__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.mc-card__add {
  padding: 10px 12px;
  border: 1px solid var(--guide-ink);
  border-radius: 999px;
  background: #fff;
  color: var(--guide-ink);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.mc-card__add.is-added {
  border-color: var(--guide-ink);
  background: var(--guide-ink);
  color: #fff;
}

.mc-card__add[disabled] {
  border-color: var(--guide-border);
  color: var(--guide-muted);
  cursor: not-allowed;
}

.mc-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--guide-orange-deep);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.mc-card__cta:hover { opacity: 0.92; }

.mc-empty {
  margin: 14px 0 0;
  padding: 14px;
  border: 1px dashed var(--guide-border);
  border-radius: 12px;
  color: var(--guide-muted);
  font-size: 0.88rem;
}

.mc-note {
  margin: 14px 0 0;
  color: var(--guide-muted);
  font-size: 0.78rem;
  line-height: 1.75;
}

/* ---------- 3校比較表 ---------- */
.mc-table {
  margin-top: 20px;
  padding: 14px;
  border: 1px solid var(--guide-border);
  border-radius: 14px;
  background: var(--guide-soft);
}

.mc-table__title {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

/* 狭い画面は学校ごとの縦積み、768px 以上は学校を列にした表。
   同じ内容を2つの形で描き、CSS でどちらかだけを出す（js/monthly-compare.js）。 */
.mc-table__matrix { display: none; }

.mc-table__stack {
  display: grid;
  gap: 12px;
}

.mc-stack {
  padding: 12px 14px;
  border: 1px solid var(--guide-border);
  border-radius: 12px;
  background: #fff;
}

.mc-stack__name {
  margin: 0 0 8px;
  font-size: 0.98rem;
  line-height: 1.45;
}

.mc-stack__list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.mc-stack__row {
  display: grid;
  /* 「キャンペーン条件」（8文字）が折り返さない幅にそろえる。 */
  grid-template-columns: 8.4em minmax(0, 1fr);
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--guide-border);
}

.mc-stack__row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.mc-stack__row dt {
  color: var(--guide-muted);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.75;
}

.mc-stack__row dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

/* キャンペーン条件は要約だけを出し、原文は details の中に入れる */
.mc-cond__amount {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.6;
}

.mc-cond__name {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.6;
}

.mc-cond__period {
  margin: 2px 0 0;
  color: var(--guide-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.6;
}

/* 金額の内訳（プラン欄）。原文が100字を超える校があるので頭2行までにとどめ、
   続きは「条件をすべて見る」の中で全文を出す。 */
.mc-cond__plan {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 2px 0 0;
  color: var(--guide-muted);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.7;
}

.mc-cond__more {
  margin-top: 6px;
  font-weight: 400;
}

.mc-cond__more > summary {
  cursor: pointer;
  color: var(--guide-gold-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.mc-cond__more p {
  margin: 6px 0 0;
  color: var(--guide-muted);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.75;
}

.mc-table__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mc-table table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.84rem;
}

.mc-table th,
.mc-table td {
  padding: 8px 10px;
  border: 1px solid var(--guide-border);
  text-align: left;
  vertical-align: top;
  line-height: 1.65;
}

.mc-table thead th {
  background: var(--guide-ink);
  color: #fff;
  font-size: 0.82rem;
}

.mc-table tbody th {
  width: 7.5em;
  background: var(--guide-soft);
  font-weight: 800;
  white-space: nowrap;
}

.mc-table__ctas {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.mc-table__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--guide-orange-deep);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

/* ---------- 固定比較バー ----------
   既存の固定申込CTA（.fixed-actions）は SP で画面下いっぱい・高さ約63px、
   PC では右下に浮く 220px のボタン。どちらとも重ならない位置に置く。 */
.mc-bar {
  position: fixed;
  right: 0;
  bottom: calc(62px + env(safe-area-inset-bottom));
  left: 0;
  z-index: 29;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 10px 12px;
  border-top: 1px solid var(--guide-border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -8px 20px rgba(45, 52, 54, 0.1);
}

.mc-bar[hidden] { display: none; }

.mc-bar__list {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.5;
}

.mc-bar__actions {
  display: flex;
  gap: 8px;
  width: 100%;
}

.mc-bar__clear {
  padding: 8px 12px;
  border: 1px solid var(--guide-border);
  border-radius: 999px;
  background: #fff;
  color: var(--guide-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.mc-bar__open {
  flex: 1;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--guide-ink);
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
}

/* ---------- 768px 以上 ---------- */
@media (min-width: 768px) {
  .mr {
    grid-template-columns: 1.25fr 1fr;
    align-items: start;
  }

  .mr-card__cta { width: auto; }

  .mc-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .mc-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .mc-bar {
    bottom: 0;
    width: 100%;
    /* 右下に浮く固定申込CTA（right: max(28px, 4vw) / 幅220px）の分だけ空ける。 */
    padding: 12px calc(max(28px, 4vw) + 236px) 12px 20px;
  }

  .mc-bar__list { flex: 1 1 auto; }
  .mc-bar__actions { width: auto; }
  .mc-bar__open { flex: 0 0 auto; padding: 0 22px; }

  .mc-table__stack { display: none; }
  .mc-table__matrix { display: block; }
  .mc-table tbody th { width: 8em; }
}


/* ---------- 料金相場（inc/common/monthly-compare-range.php） ---------- */
.mrg {
  padding: 14px 16px;
  border: 1px solid var(--guide-border);
  border-radius: 14px;
  background: var(--guide-soft);
}

.mrg__head {
  display: grid;
  gap: 2px;
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 800;
}

.mrg__head span {
  color: var(--guide-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.mrg__list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.mrg__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--guide-border);
}

.mrg__row dt {
  font-size: 0.86rem;
  font-weight: 800;
}

.mrg__row dd {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
}

.mrg__value {
  color: var(--guide-orange-deep);
  font-size: 1.05rem;
  font-weight: 900;
}

.mrg__count {
  color: var(--guide-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.mrg__note {
  margin: 10px 0 0;
  color: var(--guide-muted);
  font-size: 0.76rem;
  line-height: 1.7;
}
