/* ===============================================
  スタイルガイドの適用（docs/style_guide/index.html。2026-10-30 作成）
  対象：サービス再開まわりの画面（新規登録・ログインのポップアップ・本人確認・ご利用再開手続き・手続きの案内ページ）
  使い方
  ・各ページの CSS の一番最後で読み込む（案内ページだけは、専用の migration_guide.css の前）
  ・ガイドを当てる範囲の要素に class="sg-scope" を付ける（ふつうは <main>。ログインのポップアップは、ポップアップの枠）
  ・数値は下の変数（--sg-）にまとめた。ガイドの数値が変わったら、変数だけを直す
  ・サイト全体に広げるときは、.sg-scope を付けるページを増やす（または .sg-scope の条件を外す）
  str2 の部品（app.css の .oneaccount-migrate 〜 など）を上書きするため、ルールは .sg-scope を前に付けて、同じ強さ以上にしている
=============================================== */

/* -----------------------------------------------
  数値（スタイルガイドの表と1対1）
----------------------------------------------- */
:root {
  /* 文字の大きさ（PC は 600px 以上、SP は 599px 以下） */
  --sg-fs-h1: 2rem;
  --sg-fs-h1-sp: 1.8rem;
  --sg-fs-h2: 1.8rem;
  --sg-fs-h2-sp: 1.6rem;
  --sg-fs-body: 1.6rem;
  --sg-fs-sub: 1.4rem;
  --sg-fs-note: 1.2rem;
  --sg-fs-input: 1.6rem;

  /* 行間 */
  --sg-lh-heading: 1.4;
  --sg-lh-body: 1.7; /* 文字の間隔を空けないぶん、行間で読みやすさを保つ（2026-10-30 行間と文字の間隔をセットで見直した） */
  --sg-lh-list: 1.6; /* 箇条書き：1項目が短く、項目どうしの間もあるので、本文より少し詰める */
  --sg-lh-note: 1.6;
  --sg-lh-label: 1.4;
  --sg-lh-table: 1.6;

  /* 余白（8px を単位にする） */
  --sg-space-paragraph: 1.6rem;
  --sg-space-list: 1.6rem;
  --sg-space-list-item: 0.4rem; /* 2026-10-30 8px では項目が離れて見えたため、半分にした */
  --sg-space-list-nested: 0.4rem;
  --sg-space-heading-top: 3.2rem;
  --sg-space-heading-bottom: 1.2rem;

  /* 文字の間隔 */
  --sg-ls-text: 0; /* 日本語は空けない。空けると行間とぶつかって間延びする（2026-10-30。0.04em・0.02em では広すぎた） */
  --sg-ls-label: 0.08em;
  --sg-ls-alnum: 0;

  /* 色（リンクは str2 の規定：未訪問はピンク、訪問済みはグレーブルー） */
  --sg-color-text: #333;
  --sg-color-link: #e91e63;
  --sg-color-link-visited: #607d8b;
  /* 注意（重要）：濃い赤。白地で 5.6:1。文頭の※と一緒に使い、色だけで伝えない。太字にはしない */
  --sg-color-warn: #c62828;
}

/* -----------------------------------------------
  全画面共通
----------------------------------------------- */
/* 本文の行間（文字の間隔は空けない。str2 の部品に付いている文字の間隔も、ここで消す） */
.sg-scope {
  line-height: var(--sg-lh-body);
}

/* 文字の間隔（em は親の値が px で受け継がれるため、要素ごとに付けて、文字の大きさに追従させる） */
.sg-scope,
.sg-scope * {
  letter-spacing: var(--sg-ls-text);
}

/* Google のログインボタン（Google の決まった見た目）と、URL（英数字だけの部分）は空けない */
.sg-scope .mg-google,
.sg-scope .mg-google *,
.sg-scope .oneaccount-consent__terms a {
  letter-spacing: var(--sg-ls-alnum);
}

/* 入力欄：16px 未満だと、iPhone（Safari）で入力時に画面が拡大される */
.sg-scope input:not([type="checkbox"]):not([type="radio"]),
.sg-scope select,
.sg-scope textarea {
  font-size: var(--sg-fs-input);
}

/* タイトルの帯の見出し（str2 の .h1。文字の間隔は str2 の 0.1em を本文と同じに、行間は見出しの 1.4 に） */
.sg-scope .h1,
.sg-scope .h1 *,
.sg-scope .mg-titlebar .h1,
.sg-scope .mg-titlebar .h1 * {
  line-height: var(--sg-lh-heading);
  letter-spacing: var(--sg-ls-text);
}

/* ボタン：文字の間隔 0.08em・行間 1.4 */
.sg-scope .btnRed {
  line-height: var(--sg-lh-label);
  letter-spacing: var(--sg-ls-label);
}

/* -----------------------------------------------
  新規登録・ご利用再開手続きに共通の部品（app.css の .oneaccount-regist / .oneaccount-migrate 〜）
----------------------------------------------- */
/* ステップ表示：12px より小さくしない（13px・11px を 12px に） */
.sg-scope .mg-steps__label,
.sg-scope .mg-steps__label small {
  font-size: var(--sg-fs-note);
}

/* 同意のフォームの上：冒頭の1文（「本人確認が完了しました。」「infoQへのご登録ありがとうございます。」）と、その下の説明文の間を、段落の間（16px）に詰める（str2 は 32px） */
.sg-scope .wrapUnder-discription + form > .mg-block:first-child {
  margin-top: var(--sg-space-paragraph);
}

/* 冒頭の説明文・箇条書き：15px・行間 1.8 を本文の 16px に。行間は説明文 1.7、箇条書き 1.6 */
.sg-scope .mg-block__lead,
.sg-scope .mg-block li {
  font-size: var(--sg-fs-body);
  line-height: var(--sg-lh-body);
}

.sg-scope .mg-block li {
  line-height: var(--sg-lh-list);
}

/* 「上記の事項に同意する」：15px を本文の 16px に（1行のラベルなので行間 1.4） */
.sg-scope .mg-agree {
  font-size: var(--sg-fs-body);
  line-height: var(--sg-lh-label);
}

/* 同意事項の本文：枠の中の長い規約文なので補足の 14px のまま。行間 1.7、見出しは 16px・行間 1.4、余白は段落 16px・見出しの上 32px・下 12px */
.sg-scope .oneaccount-consent__terms {
  line-height: var(--sg-lh-body);
}

.sg-scope .oneaccount-consent__terms p {
  margin-bottom: var(--sg-space-paragraph);
}

.sg-scope .oneaccount-consent__terms h2,
.sg-scope .oneaccount-consent__terms h3 {
  margin: var(--sg-space-heading-top) 0 var(--sg-space-heading-bottom);
  font-size: var(--sg-fs-body);
  line-height: var(--sg-lh-heading);
}

.sg-scope .oneaccount-consent__terms h2 {
  margin-top: 0;
}

/* 1アカウントの説明の吹き出し：補足（14px）の行間 1.7。「詳しくはこちら」は紺色から、リンクの色に */
.sg-scope .mg-bubble {
  line-height: var(--sg-lh-body);
}

.sg-scope .mg-bubble a,
.sg-scope .mg-about a {
  color: var(--sg-color-link);
}

.sg-scope .mg-bubble a:visited,
.sg-scope .mg-about a:visited {
  color: var(--sg-color-link-visited);
}

/* 困ったときのリンク（Googleアカウントがない方 など）：文字の色からリンクの色に。行間 1.7 */
.sg-scope .mg-help__link {
  color: var(--sg-color-link);
  line-height: var(--sg-lh-body);
}

.sg-scope .mg-help__link:visited {
  color: var(--sg-color-link-visited);
}

/* 新規登録の「ログインはこちら」の行：13px を補足の 14px に */
.sg-scope .mg-block__lead--note {
  font-size: var(--sg-fs-sub);
}

/* -----------------------------------------------
  ご利用再開手続き（全画面）
----------------------------------------------- */
/* ワンタイムパスワードの画面の、ボタンの下の注意の箇条書き：注意・補足なので補足の 14px に。項目どうしは 4px（style2_mock.css の 8px より優先） */
.sg-scope .mg-notes li {
  margin-bottom: var(--sg-space-list-item);
  font-size: var(--sg-fs-sub);
  line-height: var(--sg-lh-list);
}

/* 1ステップ目の吹き出し「〜手続きがお済みの方」：13px を補足の 14px に（SP で2行になるため、言葉の切れ目で折り返す） */
.sg-scope .mg-login-link__bubble {
  font-size: var(--sg-fs-sub);
  word-break: auto-phrase;
}

/* -----------------------------------------------
  新規登録：登録情報の入力（regist_profile とエラー・期限切れ。formStyle.css の画面）
  formStyle.css は本文が SP 14px・全部太字のため、本文 16px・標準の太さにそろえる。項目名（dt・label）は太字のまま
----------------------------------------------- */
.sg-scope.registration-form {
  font-size: var(--sg-fs-body);
}

/* ページの見出し「新規会員登録」（h2 だが、ページの一番上の見出しなので大見出しの大きさ）：24px（SP 21px）を 20px（SP 18px）に */
.sg-scope .form-area .title h2 {
  font-size: var(--sg-fs-h1);
  line-height: var(--sg-lh-heading);
}

.sg-scope.registration-form p {
  font-weight: 400;
}

/* 項目名：行間 2 を1行のラベルの 1.4 にし、下に 8px の余白（入力欄との間をほぼ同じに保つ） */
.sg-scope .form-item-box dl dt {
  margin-bottom: 0.8rem;
  line-height: var(--sg-lh-label);
}

/* 必須マーク：0.75em（SP 10.5px）を 12px に */
.sg-scope .required {
  font-size: var(--sg-fs-note);
}

/* 性別のボタン・登録するボタン：文字の間隔をボタンの 0.08em に（登録するボタンの、マウスを載せたときに広がる動きは残す） */
.sg-scope .form-item-box .genderBox div:first-child label,
.sg-scope .send-button {
  letter-spacing: var(--sg-ls-label);
}

.sg-scope .send-button:hover {
  letter-spacing: 0.12em;
}

/* 同意の行の、規約・プライバシーステートメントのリンク：チェックボックスのラベルでもあるので、色は本文の色（ピンクにしない）、下線は付ける（リンクのスタイルの例外）。
   str2 は、リンクの色が紺・下線が文字の下の点線（span の border-bottom）だったので、その点線は外し、リンク自身の実線の下線にする。
   訪問済みでも色は変えない（別ウィンドウのマークは画像のまま） */
.sg-scope .form-item-box .agreeBox a,
.sg-scope .form-item-box .agreeBox a:visited {
  color: var(--sg-color-text);
  text-decoration: underline;
}

.sg-scope .form-item-box .agreeBox a span {
  border-bottom: 0;
}

/* 別ウィンドウのマーク（紺色の画像 #142346）を、文字と同じ #333 にする：いったん黒にして（brightness(0)）、20% だけ明るく（invert(.2) → 51,51,51 = #333）。透明な部分はそのまま */
.sg-scope .form-item-box .agreeBox a img {
  -webkit-filter: brightness(0) invert(.2);
  filter: brightness(0) invert(.2);
}

/* 登録するボタン・新規登録の最初へのボタンなど（.send-button）：右に三角矢印（▶）を必ず付ける。
   手続きの画面の「ワンタイムパスワードを送る」などの .btnArrow-R と同じ見た目（str2 の style2.css の .btnArrow-R:after と同じ値）。HTML に btnArrow-R を付け忘れても付く */
.sg-scope .send-button::after {
  -webkit-transition: .3s;
  transition: .3s;
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f0da";
  margin-left: .3em;
  opacity: .8;
}

/* 登録するボタン・新規登録の最初へのボタン：文字の大きさは本文と同じ 16px（str2 は 20px で、表の 16・14・12px に無い）、行間はボタンの 1.4（str2 は標準） */
.sg-scope .send-button {
  font-size: var(--sg-fs-body);
  line-height: var(--sg-lh-label);
}

/* -----------------------------------------------
  新規登録：本登録完了（regist_complete・期限切れ）
----------------------------------------------- */
/* 枠の見出し「infoQ 本登録が完了いたしました。」：見出し（h2）の大きさ・行間 */
.sg-scope .wrapUnder-confirm3_box dt {
  font-size: var(--sg-fs-h2);
  line-height: var(--sg-lh-heading);
}

/* -----------------------------------------------
  本人確認（profile_reauth）
----------------------------------------------- */
/* 「本人確認」（h2）と「1アカウントによる本人確認」（h3。h2 より大きい 24px だった）：どちらも見出し（h2）の大きさ・行間に */
.sg-scope .verification-maintitle,
.sg-scope .form-contents__maintitle {
  font-size: var(--sg-fs-h2);
  line-height: var(--sg-lh-heading);
}

/* -----------------------------------------------
  ログインのポップアップ（login。トップの上に重なる枠に .sg-scope を付ける）
----------------------------------------------- */
/* 「infoQご利用再開（ログイン）手続きはこちら」「新規会員登録（無料）はこちら」：青からリンクの色に */
.sg-scope .login-resume__links a {
  color: var(--sg-color-link);
}

.sg-scope .login-resume__links a:visited {
  color: var(--sg-color-link-visited);
}

/* -----------------------------------------------
  SP（599px 以下）：大見出し 18px、見出し 16px
----------------------------------------------- */
@media (max-width: 599px) {
  .sg-scope .form-area .title h2 {
    font-size: var(--sg-fs-h1-sp);
  }

  .sg-scope .wrapUnder-confirm3_box dt,
  .sg-scope .verification-maintitle,
  .sg-scope .form-contents__maintitle {
    font-size: var(--sg-fs-h2-sp);
  }
}

/* 新規登録の最初へ（リンクのボタン）：訪問済みなどのリンクの色（グレー）に負けず、文字は白にする */
.sg-scope a.send-button,
.sg-scope a.send-button:visited,
.sg-scope a.send-button:hover {
  color: #fff;
}
