@charset "UTF-8";

/* ============================================================
   フォトン算数オンライン｜入塾申し込みフォーム
   ページ固有：入力画面の書類とその同意

   対象ファイル
     domestic / abroad の index.ejs・index-middle.ejs

   規約本文はスクロール枠に収める。ワード文書相当の体裁を
   標準タグ（h2 / h3 / p / ol / ul / table）で表現し、
   採番と折り返しはCSSが持つ。改定時は文字を書き換えるだけ。

   【読み込み順】共通CSS群 → 本ファイル → c-reduced-motion.css
   ============================================================ */


/* ============================================================
   1. 枠

   カード内にもう一段の枠を作る。実線＋白地は「確定した情報」
   というフォーム全体のルールに合わせている。
   ============================================================ */
/* 前のカードから十分に隢し、別のまとまりとして読ませる */
.l-terms{margin:28px 0 20px;}

.l-terms__head{
  display:flex;
  align-items:center;
  gap:9px;
  margin-bottom:12px;
  font-size:16px;
  font-weight:700;
  color:var(--ink);
}

.l-terms__head::before{
  content:"";
  flex:0 0 auto;
  width:20px;
  height:20px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%237e867f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7.5z'/%3E%3Cpath d='M14.3 3v4.4H19'/%3E%3Cpath d='M8.7 12.6h6.6M8.7 16.1h4.4'/%3E%3C/svg%3E") center/20px 20px no-repeat;
}

/* スクロールする本体。下端に続きがあることを影で示す */
.l-terms__body{
  position:relative;
  max-height:280px;
  padding:20px 22px;
  overflow-y:auto;
  overflow-wrap:anywhere;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  font-size:14.5px;
  line-height:1.9;
  color:var(--ink);
  overscroll-behavior:contain;
}

/* スクロールバーを細く、色を地に馴染ませる */
.l-terms__body{scrollbar-width:thin;scrollbar-color:#cfd6cf transparent;}
.l-terms__body::-webkit-scrollbar{width:10px;}
.l-terms__body::-webkit-scrollbar-track{background:transparent;}
.l-terms__body::-webkit-scrollbar-thumb{
  background:#cfd6cf;
  border:3px solid #fff;
  border-radius:999px;
}


/* ============================================================
   2. 文書の体裁

   ワード文書に相当する見え方を標準タグで作る。
   規約の改定時はテキストの差し替えだけで済む。
   ============================================================ */

/* 文書タイトル */
.l-terms__body h2{
  margin:0 0 6px;
  font-size:16px;
  font-weight:900;
  text-align:center;
  letter-spacing:.04em;
}

/* 前文 */
.l-terms__body > p:first-of-type{margin-top:14px;}

/* 条見出し */
.l-terms__body h3{
  margin:22px 0 6px;
  font-size:15px;
  font-weight:700;
  color:var(--green-deep);
}

.l-terms__body h3:first-of-type{margin-top:18px;}

.l-terms__body p{margin:0 0 8px;}
.l-terms__body p:last-child{margin-bottom:0;}

/* 番号付き条項。折り返しは番号ではなく文字の頭に揃える
   （ワードのぶら下げインデントと同じ挙動） */
.l-terms__body ol{
  margin:0 0 8px;
  padding-left:1.9em;
  list-style-position:outside;
}

.l-terms__body ol > li{margin-bottom:5px;}
.l-terms__body ol > li:last-child{margin-bottom:0;}

/* 入れ子は書式を変える。第2階層は (1) (2) 、第3階層は ア イ ウ */
.l-terms__body ol ol{
  margin-top:6px;
  padding-left:2.2em;
  list-style-type:none;
  counter-reset:sub;
}

.l-terms__body ol ol > li{position:relative;counter-increment:sub;}

.l-terms__body ol ol > li::before{
  content:"(" counter(sub) ")";
  position:absolute;
  left:-2.2em;
  width:2em;
  text-align:left;
  color:var(--muted);
}

/* 箇条書き */
.l-terms__body ul{
  margin:0 0 8px;
  padding-left:1.4em;
  list-style-type:none;
}

.l-terms__body ul > li{position:relative;margin-bottom:5px;}

.l-terms__body ul > li::before{
  content:"・";
  position:absolute;
  left:-1.4em;
  color:var(--muted);
}

/* 引用・注記のぶら下げ */
.l-terms__body blockquote{
  margin:8px 0 10px 1.2em;
  padding-left:14px;
  border-left:2px solid var(--line);
  color:var(--muted);
}

/* 表 */
.l-terms__body table{
  width:100%;
  margin:10px 0;
  border-collapse:collapse;
  font-size:14px;
}

.l-terms__body th,
.l-terms__body td{
  padding:8px 10px;
  text-align:left;
  border:1px solid var(--line);
}

.l-terms__body th{background:var(--cream);font-weight:700;}

.l-terms__body hr{
  margin:20px 0;
  height:1px;
  background:var(--line);
  border:none;
}

.l-terms__body small{font-size:13px;color:var(--muted);}

/* 揃えの指定。制定日や署名欄に使う */
.l-terms__body .is-center{text-align:center;}
.l-terms__body .is-right{text-align:right;}

.l-terms__body .l-terms__date{
  margin-top:20px;
  font-size:13.5px;
  color:var(--muted);
  text-align:right;
}


/* ============================================================
   3. 同意チェック

   選択肢のピルとは役割が違うため、四角い枠の中に置く。
   未チェックのときは仮申込ボタンを押せない状態にする。
   ============================================================ */
.l-terms__agree{
  margin-top:14px;
  padding:16px 18px;
  background:var(--cream);
  border-radius:18px;
}

.l-terms__agree input[type="checkbox"]{
  position:absolute;
  opacity:0;
  width:0;
  height:0;
}

.l-terms__agree label{
  position:relative;
  display:block;
  padding-left:36px;
  font-size:15px;
  font-weight:700;
  line-height:1.6;
  color:var(--ink);
  cursor:pointer;
  text-wrap:pretty;
}

.l-terms__agree label::before{
  content:"";
  position:absolute;
  left:0;
  top:1px;
  width:22px;
  height:22px;
  background:#fff;
  border:2px solid #b9c2ba;
  border-radius:7px;
  box-sizing:border-box;
  transition:background-color .16s,border-color .16s;
}

.l-terms__agree input[type="checkbox"]:checked+label{color:var(--green-deep);}

.l-terms__agree input[type="checkbox"]:checked+label::before{
  background:var(--green);
  border-color:var(--green);
}

/* チェックマーク */
.l-terms__agree input[type="checkbox"]:checked+label::after{
  content:"";
  position:absolute;
  left:7px;
  top:6px;
  width:6px;
  height:11px;
  border:2.4px solid #fff;
  border-top:0;
  border-left:0;
  transform:rotate(45deg);
  box-sizing:border-box;
}

.l-terms__agree input[type="checkbox"]:focus-visible+label::before{
  box-shadow:0 0 0 4px rgba(60,180,100,.18);
}


/* ============================================================
   4. 未同意のときのボタン

   押せないことを見た目で示す。文字は読める濃さを保つ。
   ============================================================ */
.l-submit__btn:disabled{
  color:#8d968e;
  background:#e3e7e3;
  border-color:#e3e7e3;
  cursor:not-allowed;
  box-shadow:none;
}
