/*
 * 会員登録フローの共通の見た目（2026-10-06）
 * 読み込むのは includes/registration-flow.php の対象テンプレートだけ（body.sm-rf）。
 * ほかに、確認のメールを送り直す箱（.rf-lookup）を出すログインのページと、登録フォーム（.rf-regform）を出す LP でも読み込む（そこでは .rf-lookup・.rf-regform のほかは使わない）。
 * 色・書体・ボタンは新しい LP（prototypes/lp-claude/src/lp.css）と同じ:
 *   紺の文字・白地・青い板の水色・黄色のボタン（紺のふち＋下に落ちる硬い影）。
 * 本文 = BIZ UDPGothic、大きい見出しだけ Dela Gothic One（header.php で全ページ読み込み済み）。
 */

/* ───────── Cocoon の板・タイトルを外す ───────── */
body.sm-rf .article {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin-top: 0 !important;
}
body.sm-rf .article-header { display: none !important; }
body.sm-rf .entry-content { margin: 0 !important; padding: 0 !important; }

/* ───────── 土台 ───────── */
/* 色・書体（確認のメールを送り直す箱 .rf-lookup は、ログイン・登録の LP にも単独で出るので同じ値を持つ） */
.rf,
.rf-lookup,
.rf-regform {
  --rf-ink: #10254d;
  --rf-ink-soft: #485b82;
  --rf-paper: #ffffff;
  --rf-sky: #eaf4ff;
  --rf-line: #c8dcf3;
  --rf-blue: #2274e2;
  --rf-deep: #123a7a;
  --rf-sun: #ffcf1f;
  --rf-sun-soft: #fff6d1;
  --rf-ok: #1d7f54;
  --rf-bad: #b8321f;
  --rf-bad-bg: #fdecea;
  --rf-text: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --rf-display: "Dela Gothic One", "BIZ UDPGothic", "Hiragino Sans", sans-serif;
}
.rf {
  box-sizing: border-box;
  /* 背景の柄の上に直接文字を置かないよう、ページ全体を白い板に載せる */
  width: min(100% - 16px, 720px);
  /* 左上に固定のメニューとロゴ（高さ約64px）があるので、その下から始める */
  margin: 76px auto 48px;
  padding: clamp(22px, 4vw, 40px) clamp(16px, 4vw, 40px) clamp(28px, 5vw, 48px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--rf-line);
  border-radius: 20px;
  box-shadow: 0 18px 40px -28px rgba(16, 37, 77, 0.5);
  color: var(--rf-ink);
  font-family: var(--rf-text);
  font-size: 16px;
  line-height: 1.85;
  line-break: strict;
  overflow-wrap: anywhere;
  text-align: left;
}
.rf--wide { width: min(100% - 16px, 1000px); }
/* 中に入れ子にした .rf（幅を狭める用）は板にしない */
.rf .rf { width: auto; margin: 0 auto; padding: 0; background: none; border: 0; box-shadow: none; }
.rf [hidden] { display: none !important; }
.rf *, .rf *::before, .rf *::after { box-sizing: border-box; }
.rf rt { font-size: 0.5em; font-weight: 400; }
.rf img { max-width: 100%; height: auto; }
.rf a { color: var(--rf-blue); text-underline-offset: 0.2em; }
.rf a:hover { color: var(--rf-deep); }
.rf :focus-visible { outline: 3px solid var(--rf-sun); outline-offset: 3px; border-radius: 4px; }

/* Cocoon の見出し・本文の飾りを打ち消す（.article h2 などに背景や線が付く） */
body.sm-rf .article .rf h1,
body.sm-rf .article .rf h2,
body.sm-rf .article .rf h3,
body.sm-rf .article .rf h4 {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--rf-ink);
  font-family: var(--rf-text);
  font-weight: 700;
  line-height: 1.45;
  text-wrap: balance;
  font-feature-settings: "palt";
  word-break: auto-phrase; /* 日本語を文節で折り返す（新 LP と同じ。未対応のブラウザはふつうの折り返し） */
  box-shadow: none;
}
body.sm-rf .article .rf h1::before, body.sm-rf .article .rf h1::after,
body.sm-rf .article .rf h2::before, body.sm-rf .article .rf h2::after,
body.sm-rf .article .rf h3::before, body.sm-rf .article .rf h3::after,
body.sm-rf .article .rf h4::before, body.sm-rf .article .rf h4::after { content: none; display: none; }
body.sm-rf .article .rf p { margin: 0 0 0.8em; font-size: inherit; line-height: inherit; }
body.sm-rf .article .rf p:last-child { margin-bottom: 0; }
body.sm-rf .article .rf ul, body.sm-rf .article .rf ol { margin: 0; padding: 0; list-style: none; }
body.sm-rf .article .rf li { margin: 0; padding: 0; border: 0; background: none; line-height: inherit; }
body.sm-rf .article .rf li::before { content: none; }

/* ───────── 見出し ───────── */
body.sm-rf .article .rf .rf-title {
  font-family: var(--rf-display);
  font-weight: 400;
  font-size: clamp(1.45rem, 4.2vw, 1.95rem);
  letter-spacing: 0.02em;
  text-align: center;
  margin: 0 0 10px;
}
.rf-lead { text-align: center; color: var(--rf-ink-soft); margin: 0 auto 24px !important; max-width: 36em; }
body.sm-rf .article .rf .rf-h { font-size: clamp(1.15rem, 3.4vw, 1.35rem); margin: 0 0 12px; }
body.sm-rf .article .rf .rf-h3 { font-size: 1.02rem; margin: 0 0 6px; }

/* ───────── 段の表示 ───────── */
body.sm-rf .article .rf .rf-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 0;
  margin: 0 auto 22px;
  counter-reset: rf-step;
}
body.sm-rf .article .rf .rf-steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 22px;
  color: var(--rf-ink-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}
body.sm-rf .article .rf .rf-steps li:last-child { padding-right: 0; }
body.sm-rf .article .rf .rf-steps li::before {
  counter-increment: rf-step;
  content: counter(rf-step);
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--rf-line);
  background: var(--rf-paper);
  font-size: 12px;
}
body.sm-rf .article .rf .rf-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 50%;
  width: 12px;
  height: 2px;
  background: var(--rf-line);
}
body.sm-rf .article .rf .rf-steps li.is-done { color: var(--rf-ok); }
body.sm-rf .article .rf .rf-steps li.is-done::before { content: "✓"; border-color: var(--rf-ok); background: var(--rf-ok); color: #fff; }
body.sm-rf .article .rf .rf-steps li.is-now { color: var(--rf-deep); }
body.sm-rf .article .rf .rf-steps li.is-now::before { border-color: var(--rf-deep); background: var(--rf-sun); color: var(--rf-deep); }

/* ───────── カード ───────── */
.rf-card {
  background: var(--rf-paper);
  border: 1px solid var(--rf-line);
  border-radius: 14px;
  padding: clamp(18px, 4vw, 28px);
  box-shadow: 0 12px 30px -22px rgba(16, 37, 77, 0.45);
}
.rf-card + .rf-card, .rf-card + .rf-stack, .rf-stack + .rf-card { margin-top: 14px; }
.rf-card--sky { background: var(--rf-sky); border-color: var(--rf-line); box-shadow: none; }
.rf-center { text-align: center; }
.rf-note { font-size: 13px; color: var(--rf-ink-soft); }
.rf-small { font-size: 14px; }
.rf-hr { border: 0; border-top: 1px solid var(--rf-line); margin: 18px 0; }

/* ───────── ボタン（製品の「スタート！」と同じ作り） ───────── */
.rf .rf-btn,
.rf a.rf-btn,
.rf button.rf-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 54px;
  margin: 16px 0 12px;
  padding: 0.45em 1.4em;
  border: 3px solid var(--rf-deep);
  border-radius: 12px;
  background: var(--rf-sun);
  color: var(--rf-deep);
  box-shadow: 0 5px 0 var(--rf-deep);
  font: 700 1.04rem/1.35 var(--rf-text);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s, background-color 0.15s;
}
.rf .rf-btn:hover { background: #ffd83f; color: var(--rf-deep); }
.rf .rf-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--rf-deep); }
/* a.rf-btn より強くする（以前は .rf a.rf-btn に負けて黄色のままだった） */
.rf .rf-btn.rf-btn--quiet, .rf a.rf-btn.rf-btn--quiet { background: var(--rf-paper); }
.rf .rf-btn.rf-btn--quiet:hover, .rf a.rf-btn.rf-btn--quiet:hover { background: var(--rf-sky); }
.rf .rf-btn[disabled], .rf .rf-btn.is-busy { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: 0 5px 0 var(--rf-deep); }
.rf .rf-btn--inline { display: inline-flex; width: auto; }
.rf-btn-row { display: grid; gap: 4px; }
.rf .rf-textlink { display: inline-block; margin-top: 4px; font-weight: 700; font-size: 15px; }

/* ───────── 子どもが見る帯 ───────── */
.rf-kids {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  padding: 14px 16px;
  background: var(--rf-sun-soft);
  border: 2px solid var(--rf-sun);
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
}
.rf-kids p { margin: 0 !important; min-width: 0; }
.rf-kids .rf-mascot { width: 68px; height: 68px; flex: none; }
.rf-dots { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.rf-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--rf-deep); opacity: 0.3; animation: rf-dot 1.2s infinite; }
.rf-dots i:nth-child(2) { animation-delay: 0.2s; }
.rf-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes rf-dot { 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rf-dots i { animation: none; opacity: 0.6; } }

.rf-hello { text-align: center; }
.rf-hello .rf-mascot { width: 104px; height: 104px; margin: 0 auto 6px; display: block; }
body.sm-rf .article .rf .rf-hello .rf-title { font-size: clamp(1.6rem, 5vw, 2.1rem); }

/* ───────── 確認メール待ち ───────── */
.rf-addr {
  display: inline-block;
  margin: 2px 0 12px !important;
  padding: 6px 14px;
  background: var(--rf-sky);
  border-radius: 8px;
  font-weight: 700;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
/* ヒーローでメールの確認が済んだら、同じ画面のまま「お支払い」を待つ表示に切り替える（activation-status-poll.js が data-state を付ける） */
#rf-checkmail .rf-when-paywait { display: none; }
#rf-checkmail[data-state="hero-activated"] .rf-when-waiting { display: none; }
#rf-checkmail[data-state="hero-activated"] .rf-when-paywait { display: block; }
#rf-checkmail[data-state="hero-activated"] .rf-kids.rf-when-paywait { display: flex; }

/* たたむ説明 */
.rf-fold { margin-top: 16px; border-top: 1px solid var(--rf-line); padding-top: 12px; }
.rf-fold > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rf-fold > summary::-webkit-details-marker { display: none; }
.rf-fold > summary::after { content: "＋"; color: var(--rf-ink-soft); font-weight: 400; }
.rf-fold[open] > summary::after { content: "－"; }
.rf-fold__body { margin-top: 10px; font-size: 15px; }
body.sm-rf .article .rf .rf-list { margin: 0 0 10px; padding-left: 1.3em; list-style: disc; }
body.sm-rf .article .rf .rf-list li { margin-bottom: 4px; }
body.sm-rf .article .rf .rf-olist { margin: 0 0 10px; padding-left: 1.4em; list-style: decimal; }
body.sm-rf .article .rf .rf-olist li { margin-bottom: 6px; }

/* 再送（functions.php render_resend_activation_ui の中身） */
.rf-resend { margin-top: 12px; }
.rf-resend .rf-btn { margin: 8px 0 6px; }
.rf-resend__count { font-size: 13px; color: var(--rf-ink-soft); }
.rf-resend__msg { margin-top: 8px; font-size: 14px; }
.rf-resend__msg.is-ok { color: var(--rf-ok); font-weight: 700; }
.rf-resend__msg.is-error, .rf-resend__stop { color: var(--rf-bad); }
.rf-resend__warn { margin-top: 10px; padding: 10px 12px; background: var(--rf-sun-soft); border-radius: 8px; font-size: 13px; }

/* ───────── 確認のメールを送り直す（アドレスかユーザー名から。includes/registration-flow.php sm_rf_lookup_ui） ─────────
   登録フォームの下・ログインのページ（UM のフォームの外へ js/reg-flow.js が動かす）と、確認メール待ちの画面に出る */
.rf-lookup {
  box-sizing: border-box;
  margin: 16px 0;
  padding: 16px 18px;
  background: var(--rf-sky);
  border: 1px solid var(--rf-line);
  border-radius: 12px;
  color: var(--rf-ink);
  font-family: var(--rf-text);
  font-size: 15px;
  line-height: 1.75;
  text-align: left;
  overflow-wrap: anywhere;
}
.rf-lookup *, .rf-lookup *::before, .rf-lookup *::after { box-sizing: border-box; }
.rf-lookup [hidden] { display: none !important; }
.rf-lookup p { margin: 0 0 8px; }
.rf-lookup .rf-lookup__title { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.rf-lookup .rf-lookup__lead { font-size: 14px; }
.rf-lookup .rf-lookup__label { display: block; margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.rf-lookup .rf-lookup__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.rf-lookup .rf-lookup__input {
  flex: 1 1 220px;
  min-width: 0;
  height: 46px;
  margin: 0;
  padding: 0 12px;
  border: 1.5px solid var(--rf-line);
  border-radius: 10px;
  background: #fff;
  color: var(--rf-ink);
  font: 400 16px/1.4 var(--rf-text); /* 16px 未満だと iPhone が入力のときに拡大する */
  box-shadow: none;
}
.rf-lookup .rf-lookup__input:focus { border-color: var(--rf-blue); outline: none; }
.rf-lookup .rf-lookup__btn {
  flex: 0 1 auto;
  min-height: 46px;
  margin: 0;
  padding: 0.3em 1.1em;
  border: 2px solid var(--rf-deep);
  border-radius: 10px;
  background: var(--rf-paper);
  color: var(--rf-deep);
  box-shadow: 0 3px 0 var(--rf-deep);
  font: 700 15px/1.3 var(--rf-text);
  cursor: pointer;
}
.rf-lookup .rf-lookup__btn:hover { background: var(--rf-sun-soft); }
.rf-lookup .rf-lookup__btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--rf-deep); }
.rf-lookup .rf-lookup__btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: 0 3px 0 var(--rf-deep); }
.rf-lookup :focus-visible { outline: 3px solid var(--rf-sun); outline-offset: 2px; }
/* Turnstile は確かめが要るときだけ出る（interaction-only）。display:none にしない（中の iframe が止まって返事が来なくなる） */
.rf-lookup .rf-lookup__ts:not(:empty) { margin-top: 8px; }
.rf-lookup .rf-lookup__msg { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; font-size: 14px; background: #fff; }
.rf-lookup .rf-lookup__msg.is-ok { color: var(--rf-ok); font-weight: 700; }
.rf-lookup .rf-lookup__msg.is-error { color: var(--rf-bad); background: var(--rf-bad-bg); }
.rf-lookup ul.rf-lookup__notes { margin: 12px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--rf-ink-soft); }
.rf-lookup ul.rf-lookup__notes li { margin: 0 0 4px; padding: 0; list-style: none; border: 0; background: none; }
.rf-lookup a { color: var(--rf-blue); }
@media (max-width: 480px) {
  .rf-lookup .rf-lookup__btn { flex: 1 1 100%; }
}

/* ───────── 定義の並び・表 ───────── */
.rf-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 18px; margin: 0 0 4px; }
.rf-dl dt { color: var(--rf-ink-soft); font-size: 14px; }
.rf-dl dd { margin: 0; font-weight: 700; }
.rf-dl .rf-price { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.rf-dl small { font-weight: 400; color: var(--rf-ink-soft); }

.rf-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px 4px; }
body.sm-rf .article .rf table.rf-table {
  width: 100%;
  min-width: 620px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--rf-paper);
  border: 1px solid var(--rf-line);
  border-radius: 12px;
  overflow: hidden;
  font-size: 15px;
  margin: 0;
}
body.sm-rf .article .rf table.rf-table th,
body.sm-rf .article .rf table.rf-table td {
  border: 0;
  border-bottom: 1px solid var(--rf-line);
  border-right: 1px solid var(--rf-line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  background: transparent;
  color: var(--rf-ink);
  line-height: 1.7;
}
body.sm-rf .article .rf table.rf-table tr > *:last-child { border-right: 0; }
body.sm-rf .article .rf table.rf-table tbody tr:last-child > * { border-bottom: 0; }
body.sm-rf .article .rf table.rf-table thead th { background: var(--rf-sky); font-size: 15px; }
body.sm-rf .article .rf table.rf-table tbody th { width: 20%; color: var(--rf-ink-soft); font-weight: 700; background: #fafcff; font-size: 14px; }
body.sm-rf .article .rf table.rf-table .is-main { background: #fffbea; }
body.sm-rf .article .rf table.rf-table .rf-btn { margin: 2px 0; min-height: 46px; font-size: 0.95rem; }
.rf-tag { display: inline-block; padding: 0.1em 0.8em; background: var(--rf-sun); color: var(--rf-deep); font-weight: 700; font-size: 0.8rem; border-radius: 999px; margin-left: 6px; vertical-align: 0.1em; }

/* ───────── 人数を選ぶ ───────── */
.rf-count { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.rf .rf-count__btn {
  width: 46px; height: 46px; flex: none;
  border: 2px solid var(--rf-deep); border-radius: 10px;
  background: var(--rf-paper); color: var(--rf-deep);
  font: 700 22px/1 var(--rf-text); cursor: pointer;
  display: grid; place-items: center; padding: 0;
}
.rf .rf-count__btn:hover { background: var(--rf-sky); }
.rf .rf-count__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.rf .rf-count__input {
  width: 5.2em; height: 46px;
  border: 2px solid var(--rf-line); border-radius: 10px;
  text-align: center; font: 700 22px/1 var(--rf-text); color: var(--rf-ink);
  font-variant-numeric: tabular-nums; background: #fff; padding: 0 6px;
  -moz-appearance: textfield;
}
.rf .rf-count__input::-webkit-outer-spin-button, .rf .rf-count__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rf-count__unit { color: var(--rf-ink-soft); font-weight: 700; }
.rf-calc { background: var(--rf-sky); border-radius: 10px; padding: 10px 14px; font-variant-numeric: tabular-nums; margin: 0 0 12px !important; }
.rf-calc b { font-size: 1.2rem; }
.rf-calc.is-error { background: var(--rf-bad-bg); color: var(--rf-bad); }
.rf-two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.rf-two > .rf-card + .rf-card { margin-top: 0; }

/* お知らせ・エラー */
.rf-msg { margin: 10px 0 0 !important; padding: 10px 14px; border-radius: 10px; font-size: 14px; background: var(--rf-sky); }
.rf-msg.is-error { background: var(--rf-bad-bg); color: var(--rf-bad); }
.rf-msg.is-ok { background: #e7f6ee; color: var(--rf-ok); }
.rf-msg[hidden] { display: none !important; }

/* 完了・中断の丸 */
.rf-badge { width: 60px; height: 60px; border-radius: 50%; background: var(--rf-ok); color: #fff; display: grid; place-items: center; margin: 0 auto 12px; }
.rf-badge svg { width: 30px; height: 30px; }
.rf-badge--quiet { background: #e7edf5; color: var(--rf-ink-soft); }

/* 戻る */
.rf .rf-back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 14px; font-weight: 700; font-size: 14px; text-decoration: none; }
.rf .rf-back::before { content: "←"; }

/* ───────── ログインフォーム（UM フォーム 544） ───────── */
.rf-login { margin-top: 6px; }
.rf-login__lead { font-weight: 700; margin: 0 0 6px !important; }
.rf .rf-login .um { max-width: 100% !important; margin: 0 !important; padding: 0 !important; }
.rf .rf-login .um-form { padding: 0 !important; }
.rf .rf-login .um-field { padding-top: 12px !important; }
.rf .rf-login .um-field-label label { font-size: 14px !important; font-weight: 700 !important; color: var(--rf-ink) !important; line-height: 1.5 !important; }
.rf .rf-login .um-field-label .um-req { color: var(--rf-bad) !important; }
.rf .rf-login .um-form input[type="text"],
.rf .rf-login .um-form input[type="password"],
.rf .rf-login .um-form input[type="email"] {
  height: 46px !important;
  border: 1.5px solid var(--rf-line) !important;
  border-radius: 10px !important;
  font-size: 16px !important;
  padding: 0 12px !important;
  background: #fff !important;
  color: var(--rf-ink) !important;
  box-shadow: none !important;
}
.rf .rf-login .um-form input:focus { border-color: var(--rf-blue) !important; outline: none; }
.rf .rf-login .um-col-alt { margin-top: 16px !important; }
.rf .rf-login .um-left, .rf .rf-login .um-right, .rf .rf-login .um-half { float: none !important; width: 100% !important; padding: 0 !important; }
.rf .rf-login .um input[type="submit"].um-button,
.rf .rf-login .um input[type="submit"].um-button:focus {
  width: 100% !important;
  min-height: 52px !important;
  border: 3px solid var(--rf-deep) !important;
  border-radius: 12px !important;
  background: var(--rf-sun) !important;
  color: var(--rf-deep) !important;
  box-shadow: 0 5px 0 var(--rf-deep) !important;
  font: 700 1.04rem/1.3 var(--rf-text) !important;
  padding: 0.4em 1em !important;
}
.rf .rf-login .um input[type="submit"].um-button:hover { background: #ffd83f !important; }
.rf .rf-login .um-col-alt-b { margin-top: 12px !important; text-align: center !important; }
.rf .rf-login .um-link-alt { color: var(--rf-blue) !important; font-weight: 700; font-size: 14px !important; }
.rf .rf-login .um-field-error { border-radius: 8px; }

/* ───────── スマホ ───────── */
@media (max-width: 700px) {
  .rf { margin-top: 72px; font-size: 15.5px; }
  body.sm-rf .article .rf .rf-steps li { font-size: 12px; padding-right: 15px; gap: 4px; }
  body.sm-rf .article .rf .rf-steps li::before { width: 21px; height: 21px; font-size: 11px; }
  body.sm-rf .article .rf .rf-steps li:not(:last-child)::after { width: 8px; right: 4px; }
  .rf-two { grid-template-columns: minmax(0, 1fr); }
  .rf-kids { align-items: flex-start; }
  .rf-kids .rf-mascot { width: 56px; height: 56px; }
}

/* ───────── お支払いの反映待ち（page-stripe-success.php。js/reg-flow.js が遅いときに data-state="slow"） ───────── */
.rf-paywait .rf-when-slow { display: none; }
.rf-paywait[data-state="slow"] .rf-when-wait { display: none; }
.rf-paywait[data-state="slow"] .rf-when-slow { display: block; }

/* 読み上げだけの文字 */
.rf .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rf small { font-size: 0.82em; font-weight: 400; color: var(--rf-ink-soft); }

/* Cocoon の dl・dd の余白を消す */
body.sm-rf .article .rf dl { margin: 0; }
body.sm-rf .article .rf dd { margin: 0; padding: 0; }
body.sm-rf .article .rf dt { padding: 0; }

/* ───────── くらべる表（PC は表、スマホはプランごとのカード） ───────── */
.rf-only-narrow { display: none; }
.rf-plans { gap: 12px; }
body.sm-rf .article .rf .rf-plan__name { font-size: 1.1rem; margin: 0 0 2px; }
.rf-plan__sub { margin: 0 0 10px !important; font-size: 13px; color: var(--rf-ink-soft); }
.rf-plan.is-main { border: 2px solid var(--rf-sun); background: #fffdf3; }
.rf-plan .rf-dl { grid-template-columns: 7.5em minmax(0, 1fr); }
.rf-plan .rf-dl dd { font-weight: 400; }
.rf-plan .rf-btn { margin-bottom: 0; }
@media (max-width: 700px) {
  .rf-only-wide { display: none; }
  .rf-only-narrow { display: grid; }
}

/* ───────── 登録フォーム4種（UM 543・569・551・829。includes/registration-flow.php sm_rf_registration_form）─────────
   LP の中に置く部品なので body.sm-rf には頼らない。UM の CSS は !important が多く、フォームごとの動的な CSS（.um-569.um …）が本文の中で後から出るので、頭に .article を足して強くする */
.rf-regform {
  box-sizing: border-box;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 36px) clamp(16px, 4vw, 36px);
  background: var(--rf-paper);
  border: 1px solid var(--rf-line);
  border-radius: 16px;
  box-shadow: 0 12px 30px -22px rgba(16, 37, 77, 0.45);
  color: var(--rf-ink);
  font-family: var(--rf-text);
  font-size: 16px;
  line-height: 1.75;
  line-break: strict;
  overflow-wrap: anywhere;
  text-align: left;
}
/* すでに白い板の中に置く LP（hero・団体）では板を重ねない */
.rf-regform--plain { padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.rf-regform *, .rf-regform *::before, .rf-regform *::after { box-sizing: border-box; }
.rf-regform a { color: var(--rf-blue); text-underline-offset: 0.2em; }
.rf-regform :focus-visible { outline: 3px solid var(--rf-sun); outline-offset: 2px; }

/* 冒頭（読み手の札・題・段・一言） */
.rf-regform .rf-regform__head { text-align: center; margin: 0 0 6px; }
.rf-regform .rf-regform__tag {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 12px;
  background: var(--rf-sun);
  border-radius: 4px;
  color: var(--rf-deep);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}
.article .rf-regform .rf-regform__title {
  margin: 0 0 14px !important; /* 無料の LP はテンプレート全体の h2 に margin:0 !important がある */
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  color: var(--rf-ink);
  font-family: var(--rf-text);
  font-size: clamp(20px, 3.4vw, 24px);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}
.rf-regform .rf-regform__title::before, .rf-regform .rf-regform__title::after { content: none; display: none; }
.rf-regform .rf-regform__lead { margin: 0; color: var(--rf-ink-soft); font-size: 14px; line-height: 1.7; word-break: auto-phrase; text-wrap: balance; }

/* 段の表示（body.sm-rf の .rf-steps と同じ形） */
.rf-regform ol.rf-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 0;
  margin: 0 auto 14px;
  padding: 0;
  list-style: none;
  counter-reset: rf-step;
}
.rf-regform ol.rf-steps > li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0 22px 0 0;
  background: none;
  border: 0;
  color: var(--rf-ink-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}
.rf-regform ol.rf-steps > li:last-child { padding-right: 0; }
.rf-regform ol.rf-steps > li::before {
  counter-increment: rf-step;
  content: counter(rf-step);
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--rf-line);
  background: var(--rf-paper);
  font-size: 12px;
}
.rf-regform ol.rf-steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 50%;
  width: 12px;
  height: 2px;
  background: var(--rf-line);
}
.rf-regform ol.rf-steps > li.is-now { color: var(--rf-deep); }
.rf-regform ol.rf-steps > li.is-now::before { border-color: var(--rf-deep); background: var(--rf-sun); color: var(--rf-deep); }

/* 学校の案内（赤い警告の代わり） */
.rf-regform .rf-regform__notice {
  margin: 16px 0 0;
  padding: 14px 16px;
  background: var(--rf-sky);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.75;
}
.rf-regform .rf-regform__notice p { margin: 0; font-size: inherit; line-height: inherit; word-break: auto-phrase; }
.rf-regform .rf-regform__notice .rf-regform__notice-title { margin: 0 0 4px; font-size: 15px; font-weight: 700; }

/* UM の外わくを消す */
.article .rf-regform .um { max-width: 100% !important; margin: 0 !important; padding: 0 !important; background: none !important; opacity: 1; }
.article .rf-regform .um .um-form { margin: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.article .rf-regform .um .um-row { margin: 0 !important; }

/* 3つのまとまりの見出し */
.rf-regform .rf-regform__sec {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--rf-line);
}
.rf-regform .rf-regform__num {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--rf-deep);
  color: #fff;
  font-family: var(--rf-display);
  font-size: 14px;
  line-height: 1;
}
.rf-regform .rf-regform__sectitle { margin: 0; color: var(--rf-ink); font-size: 17px; font-weight: 700; line-height: 1.45; }

/* 項目 */
.article .rf-regform .um .um-field { padding: 16px 0 0 !important; margin: 0 !important; }
.article .rf-regform .um .um-field-label { margin: 0 0 6px !important; padding: 0 !important; border: 0 !important; }
.article .rf-regform .um .um-field-label label { color: var(--rf-ink) !important; font-family: var(--rf-text) !important; font-size: 15px !important; font-weight: 700 !important; line-height: 1.5 !important; }
.article .rf-regform .um .um-req { display: none !important; } /* 全部必須なので冒頭で一度だけ言う */
.article .rf-regform .um .um-form input[type="text"],
.article .rf-regform .um .um-form input[type="email"],
.article .rf-regform .um .um-form input[type="password"] {
  width: 100% !important;
  height: 48px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  background: #fff !important;
  border: 1.5px solid #9fb9d8 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  color: var(--rf-ink) !important;
  font-family: var(--rf-text) !important;
  font-size: 16px !important; /* 16px 未満だと iPhone が入力のときに拡大する */
}
.article .rf-regform .um .um-form input[type="text"]:focus,
.article .rf-regform .um .um-form input[type="email"]:focus,
.article .rf-regform .um .um-form input[type="password"]:focus {
  border-color: var(--rf-blue) !important;
  box-shadow: 0 0 0 3px rgba(34, 116, 226, 0.18) !important;
  outline: none !important;
}
.article .rf-regform .um .um-form input.um-error { border-color: var(--rf-bad) !important; }
/* もう一度の欄は、見出しと同じ文が欄の中に出るだけなので消す */
.article .rf-regform .um .um-field[data-key="confirm_user_password"] input::placeholder { color: transparent; }
.rf-regform .rf-regform__hint { margin: 6px 0 0; color: var(--rf-ink-soft); font-size: 13px; line-height: 1.65; word-break: auto-phrase; }

/* 学校のメールアドレス（〜.ed.jp）を入れたときの注意（js/reg-flow.js。無料・ヒーローの登録だけ）。止めはしないので赤でなく黄色 */
.rf-regform .rf-regform__warn {
  margin: 8px 0 0;
  padding: 8px 12px;
  background: var(--rf-sun-soft);
  border: 2px solid var(--rf-sun);
  border-radius: 8px;
  color: var(--rf-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 2;
  word-break: auto-phrase;
}
.rf-regform .rf-regform__warn[hidden] { display: none; }
.rf-regform .rf-regform__warn rt { font-size: 0.5em; font-weight: 400; }

/* 入力の間違い */
.article .rf-regform .um .um-field-error {
  width: auto !important;
  margin: 6px 0 0 !important;
  padding: 8px 12px !important;
  background: var(--rf-bad-bg) !important;
  border-radius: 8px !important;
  color: var(--rf-bad) !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}
.article .rf-regform .um .um-field-arrow { display: none !important; }
.article .rf-regform .um .um-field-error a { color: var(--rf-bad) !important; text-decoration: underline; }

/* パスワードの表示／非表示（js/reg-flow.js が付ける） */
.rf-regform .rf-pw { position: relative; display: block; }
.article .rf-regform .um .um-form .rf-pw input.um-form-field { padding-right: 72px !important; }
.rf-regform .rf-pw__btn {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 56px;
  height: 36px;
  margin: 0;
  padding: 0 8px;
  background: var(--rf-sky);
  border: 0;
  border-radius: 7px;
  color: var(--rf-deep);
  font: 700 13px/1 var(--rf-text);
  cursor: pointer;
}
.rf-regform .rf-pw__btn:hover { background: #d7e9fd; }

/* 同意のチェック */
.article .rf-regform .um .um-field-type_checkbox { padding-top: 14px !important; }
.article .rf-regform .um .um-field-checkbox.um-field-half {
  float: none !important;
  clear: both !important;
  display: block;
  width: 100% !important;
  margin: 0 !important;
}
.article .rf-regform .um .um-field-checkbox-option {
  color: var(--rf-ink) !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
  word-break: auto-phrase;
  line-break: strict;
}
.article .rf-regform .um .um-field-checkbox-option a { color: var(--rf-blue) !important; }
.article .rf-regform .um .um-field-checkbox-state i { color: var(--rf-deep) !important; }

/* Turnstile（読み込まれるまで高さを取っておく。display:none にしない） */
.article .rf-regform .um .cf-turnstile { min-height: 65px; margin: 18px 0 0; }

/* 送るボタン（製品の「スタート！」と同じ作り） */
.article .rf-regform .um .um-col-alt { margin: 18px 0 0 !important; }
.article .rf-regform .um .um-center { float: none !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
.article .rf-regform .um input[type="submit"].um-button,
.article .rf-regform .um input[type="submit"].um-button:focus {
  display: block;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 56px !important;
  margin: 0 !important;
  padding: 0.5em 1em !important;
  background: var(--rf-sun) !important;
  border: 3px solid var(--rf-deep) !important;
  border-radius: 12px !important;
  box-shadow: 0 5px 0 var(--rf-deep) !important;
  color: var(--rf-deep) !important;
  font: 700 17px/1.35 var(--rf-text) !important;
  white-space: normal;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s, background-color 0.15s;
}
.article .rf-regform .um input[type="submit"].um-button:hover { background: #ffd83f !important; }
.article .rf-regform .um input[type="submit"].um-button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--rf-deep) !important; }

/* ボタンの真下（押したあとに何が残っているか） */
.rf-regform .rf-regform__after {
  margin: 18px 0 0;
  padding: 12px 14px;
  background: var(--rf-sun-soft);
  border-radius: 10px;
  color: var(--rf-ink);
  font-size: 14px;
  line-height: 1.7;
  word-break: auto-phrase;
}
.rf-regform .rf-regform__after strong { display: block; font-size: 15px; font-weight: 700; }

@media (max-width: 700px) {
  .rf-regform ol.rf-steps > li { font-size: 12px; padding-right: 15px; gap: 4px; }
  .rf-regform ol.rf-steps > li::before { width: 21px; height: 21px; font-size: 11px; }
  .rf-regform ol.rf-steps > li:not(:last-child)::after { width: 8px; right: 4px; }
}
