/* ============================================================
   「登録なし／無料会員／月額会員」の比較ブロック（inc/theme/plan-compare.php）
   トップ・ロック画面・/register/・/guide/・/simple-login/ で共用する。

   ★リンクやボタンの文字色は `.entry-content a.X` の形でも書く。
     site-layout.css の `.entry-content a`（詳細度 0,1,1）が単一クラスの指定に勝つため
     （paywall.css の .paywall-signup-btn と同じ罠）。
   ★ロック画面（.paywall-locked）の中は、2026-09-23 からテーマに追随する（ライトは白〜生成りの地）。
     そこに置く部品の色はパネルの --pw-*（paywall.css 冒頭）に繋ぐ。固定の明るい色で書くと、
     ライトで白い地に白い文字になって読めない。
   ============================================================ */

/* ---------- 金色の文字 ----------
   このテーマは暗い地が既定で、明るい地は :root[data-theme="light"]。
   #f5b800 は明るい地の上だとコントラスト比が 1.6〜1.8:1 しか無く読めないので、
   ライトテーマでは濃い金に切り替える（約 5:1）。ロック画面の中はパネルの金（--pw-accent）に合わせる。 */
.hp-plan,
.hp-plan-details,
.hp-intro,
.hp-cta-bar {
  --hp-gold: var(--accent-color, #f5b800);
}
:root[data-theme="light"] .hp-plan,
:root[data-theme="light"] .hp-plan-details,
:root[data-theme="light"] .hp-intro,
:root[data-theme="light"] .hp-cta-bar {
  --hp-gold: #8a5e00;
}
/* ★以前はライトでもここで #f5b800 に戻していた（ロック画面が常に暗い地だった頃の名残）。
   パネルが白い地になった今は 1.8:1 で読めないので、パネルの金に繋ぐ（ライト #8a5e00＝白地 5.7:1、ダーク #f5b800）。
   :root を足して 0,3,0 にし、上のライト用（同じ 0,3,0）より後ろに置いて確実に勝たせる。 */
:root .paywall-locked .hp-plan,
:root .paywall-locked .hp-plan-details {
  --hp-gold: var(--pw-accent);
}

/* ---------- 区分ごとの3行（mini） ---------- */
.hp-plan {
  --hp-plan-ink: var(--text-main, #222);
  --hp-plan-mute: var(--text-light, #777);
  --hp-plan-line: rgba(245, 184, 0, .22);
  width: 100%;
  margin: 0;
  text-align: left;
  box-sizing: border-box;
}

.hp-plan--mini .hp-plan__tier {
  display: grid;
  grid-template-columns: 5.2em 1fr;
  column-gap: 12px;
  row-gap: 2px;
  margin: 0;
  padding: 10px 0;
  border-top: 1px dashed var(--hp-plan-line);
  font-size: .84rem;
  line-height: 1.55;
  color: var(--hp-plan-ink);
}
.hp-plan--mini .hp-plan__tier:first-child { border-top: 0; }

.hp-plan__tier-name {
  grid-row: 1 / span 2;
  font-weight: 700;
}
.hp-plan__tier-price {
  font-size: .78rem;
  color: var(--hp-plan-mute);
  font-variant-numeric: tabular-nums;
}
.hp-plan__tier-what { grid-column: 2; }

.hp-plan__tier--paid .hp-plan__tier-name,
.hp-plan__tier--paid .hp-plan__tier-price {
  color: var(--hp-gold, #f5b800);
}
.hp-plan__tier--paid .hp-plan__tier-price { font-weight: 700; }

/* ---------- 4列の表（table。入会の手引き） ---------- */
.hp-plan--table {
  border: 1px solid var(--hp-plan-line);
  border-radius: 10px;
  overflow: hidden;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--hp-plan-ink);
  margin-bottom: 14px;
}
.hp-plan--table .hp-plan__row {
  display: grid;
  grid-template-columns: minmax(7.5em, 1.5fr) repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--hp-plan-line);
}
.hp-plan--table .hp-plan__row:first-child { border-top: 0; }
.hp-plan--table .hp-plan__cell {
  padding: 9px 8px;
  text-align: center;
  border-left: 1px solid var(--hp-plan-line);
  overflow-wrap: anywhere;
}
.hp-plan--table .hp-plan__cell:first-child {
  border-left: 0;
  text-align: left;
  font-weight: 700;
}
.hp-plan--table .hp-plan__row--head .hp-plan__cell {
  font-weight: 700;
  background: rgba(245, 184, 0, .08);
}
.hp-plan--table .hp-plan__cell--paid {
  color: var(--hp-gold, #f5b800);
  font-weight: 700;
  background: rgba(245, 184, 0, .05);
}
@media (max-width: 480px) {
  .hp-plan--table { font-size: .74rem; }
  .hp-plan--table .hp-plan__cell { padding: 8px 5px; }
  .hp-plan--table .hp-plan__row { grid-template-columns: minmax(6.2em, 1.3fr) repeat(3, minmax(0, 1fr)); }
}

/* ---------- 折りたたみ（details。ロック画面） ---------- */
.hp-plan-details {
  margin: 6px 0 0;
  text-align: left;
}
.hp-plan-details__summary {
  display: block;
  padding: 8px 0 2px;
  font-size: .8rem;
  color: var(--hp-gold, #f5b800);
  cursor: pointer;
  list-style: none;
}
.hp-plan-details__summary::-webkit-details-marker { display: none; }
.hp-plan-details__summary::after {
  content: " ▾";
  font-size: .9em;
}
.hp-plan-details[open] > .hp-plan-details__summary::after { content: " ▴"; }
.hp-plan-details__summary:focus-visible {
  outline: 2px solid var(--hp-gold, #f5b800);
  outline-offset: 2px;
}
.hp-plan-details > .hp-plan { margin-top: 6px; }

/* ロック画面の中はパネルの文字色に合わせる。以前は #ece9df / #8a8474 の固定で、
   パネルが白くなったライトでは本文 1.2:1・料金 3.7:1 で読めなかった。 */
.paywall-locked .hp-plan {
  --hp-plan-ink: var(--pw-ink);
  --hp-plan-mute: var(--pw-mute);
}

/* ---------- トップの「はじめての方へ」 ---------- */
.hp-intro {
  margin: 0 0 56px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(245, 184, 0, .3);
  border-radius: 12px;
  background: rgba(245, 184, 0, .05);
  color: var(--text-main, #222);
  box-sizing: border-box;
}
.hp-intro__label {
  margin: 0 0 6px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--hp-gold, #f5b800);
}
.hp-intro__text {
  margin: 0 0 12px;
  font-size: .9rem;
  line-height: 1.75;
}
.hp-intro--free .hp-intro__text { margin-bottom: 10px; }
.hp-intro .hp-plan { margin: 0 0 4px; }
.hp-intro .hp-plan-details { margin: 0 0 14px; }
.hp-intro .hp-plan-details__summary { padding-top: 0; }
.hp-intro__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}
.hp-intro__btn,
.entry-content a.hp-intro__btn {
  flex: 1 1 150px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--btn-min-h);
  padding: 11px 10px;
  font-size: .9rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  color: var(--btn-ink);
  background: var(--gold);
  border: 2px solid transparent;
  border-radius: var(--btn-radius);
  box-sizing: border-box;
}
.hp-intro__btn:hover,
.entry-content a.hp-intro__btn:hover { color: var(--btn-ink); filter: brightness(1.06); }
.hp-intro__btn--ghost,
.entry-content a.hp-intro__btn--ghost,
.hp-intro__btn--ghost:hover,
.entry-content a.hp-intro__btn--ghost:hover {
  color: var(--btn-accent);
  background: transparent;
  border-color: currentColor;
  filter: none;
}
@media (max-width: 480px) {
  .hp-intro { padding: 16px 14px 14px; margin-bottom: 44px; }
}

/* ---------- 機種ページの狙い目タブのいちばん上に出す案内バー ----------
   タブのすぐ下＝必ず1画面目に入る位置。料金と2つの入口だけを置く細い帯。
   .entry-content の中に出るので、リンク色は `.entry-content a.X` の形でも書く。 */
.hp-cta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(245, 184, 0, .35);
  border-radius: 10px;
  background: rgba(245, 184, 0, .06);
  color: var(--text-main, #222);
  box-sizing: border-box;
}
.hp-cta-bar__text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  margin: 0;
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.5;
}
.hp-cta-bar__lock { flex: 0 0 auto; color: var(--hp-gold, #f5b800); }
.hp-cta-bar__price {
  font-weight: 700;
  color: var(--hp-gold, #f5b800);
  font-variant-numeric: tabular-nums;
}
.hp-cta-bar__actions {
  display: flex;
  gap: 8px;
  margin: 0;
  flex: 1 1 220px;
}
.hp-cta-bar__btn,
.entry-content a.hp-cta-bar__btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  font-size: .86rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  color: var(--btn-ink);
  background: var(--gold);
  border: 2px solid transparent;
  border-radius: var(--btn-radius);
  box-sizing: border-box;
}
.hp-cta-bar__btn:hover,
.entry-content a.hp-cta-bar__btn:hover { color: var(--btn-ink); filter: brightness(1.06); }
.hp-cta-bar__btn--ghost,
.entry-content a.hp-cta-bar__btn--ghost,
.hp-cta-bar__btn--ghost:hover,
.entry-content a.hp-cta-bar__btn--ghost:hover {
  color: var(--btn-accent);
  background: transparent;
  border-color: currentColor;
  filter: none;
}

/* バーの「ログイン」から飛んできたとき、上の固定要素に隠れないように */
.paywall-login { scroll-margin-top: 84px; }

/* ---------- ログインページに置いた共用ブロック（ライトテーマ） ----------
   .paywall-signup / .paywall-login の配色は paywall.css にある（ライトの金はそちらでも #8a5e00）。
   ログインページでは明るい地の上に直接出るので、金色のリンクは念のためここでも濃くしておく。 */
:root[data-theme="light"] .lp-wrap a.paywall-signup-btn--ghost,
:root[data-theme="light"] .lp-wrap a.paywall-signup-btn--ghost:hover,
:root[data-theme="light"] .lp-wrap a.paywall-login-forgot,
:root[data-theme="light"] .lp-wrap a.paywall-login-forgot:hover {
  color: #8a5e00;
}
:root[data-theme="light"] .lp-wrap a.paywall-signup-btn--ghost {
  border-color: rgba(138, 94, 0, .5);
}
