/* Fixed: 資料請求ページをredesign準拠のデザインへ変更（理由: Next.js版との表示差をなくすため） */
.request-redesign {
  --req-bg: #fbf9f5;
  --req-white: #fff;
  --req-soft: #f4f0e8;
  --req-ink: #2e2e2e;
  --req-muted: #666;
  --req-primary: #3a93ca;
  --req-primary-soft: #e7f2f9;
  --req-accent: #52b1af;
  --req-red: #ec7493;
  --req-line: #e5e0d6;
  --req-font-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  --req-font-heading: "Zen Maru Gothic", var(--req-font-sans);
  --req-font-en: "Elms Sans", var(--req-font-sans);
  background: var(--req-bg);
  color: var(--req-ink);
  font-family: var(--req-font-sans);
  line-height: 1.8;
}

.request-redesign .container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.request-redesign .section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

/* ===== ヒーロー ===== */
.request-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--req-line);
  background: var(--req-soft);
}

.request-hero:before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/top/hero_rightlower.webp") center / cover;
  transform: scale(1.15);
  filter: blur(48px) saturate(1.15);
  opacity: .5;
}

.request-hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-70deg, rgba(255, 255, 255, .33) 0, rgba(255, 255, 255, .33) 2px, transparent 2px, transparent 6px);
}

.request-hero > .container {
  position: relative;
  z-index: 1;
}

.request-hero__en,
.request-hero__title,
.request-hero__lead {
  display: table;
  background: #fff;
  padding: .06em .28em;
}

/* Fixed: Hero見出し内の英語ラベル（Contact等）はNext.js版で--font-en（Elms Sans）・
   letter-spacing・text-transform:uppercaseを使用しているが、request-redesign.css
   にはこれらの指定がなく本文フォント・原文表記のまま出力されていたため追加
   （理由: スクリーンショット比較でフォント・大文字化の違いが指摘されたため。
   Elms Sansの@font-faceはtop.css経由で既に読み込まれているamenimo-top-style
   に含まれる）。margin-bottomは正本(PageShell.module.css .en)には無く、
   ローカルのみ余分な隙間が見えたため削除。 */
.request-hero__en {
  font-family: var(--req-font-en);
  color: var(--req-primary);
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.1;
}

/* Fixed: Next.js版(PageShell.module.css .title)ではh1にmargin-topが無く、
   .enのmargin-bottomで見出し間の余白を作っているため、h1側の余分な
   margin-topを削除（理由: localhost:3000/contactとの見比べでh1の
   margin-topが不要と指摘されたため）。 */
.request-hero__title {
  font-family: var(--req-font-heading);
  font-size: clamp(1.05rem, 2.5vw, 1.4rem);
  line-height: 1.4;
}

.request-hero__lead {
  margin-top: 1rem;
  color: var(--req-muted);
}

.request-hero__crumbs {
  display: inline-flex;
  gap: .65rem;
  margin-top: 1.5rem;
  padding: .35rem .95rem;
  border: 1px solid var(--req-line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(58, 147, 202, .08);
  font-size: .82rem;
  color: var(--req-muted);
}

.request-hero__crumbs a {
  color: var(--req-primary);
}

/* ===== セクション見出し ===== */
.request-heading {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.request-heading .section-heading__en {
  display: block;
  margin-bottom: .5rem;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  letter-spacing: .08em;
  color: var(--req-primary);
  font-weight: 600;
}

.request-heading .section-heading__title {
  font-family: var(--req-font-heading);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  line-height: 1.4;
}

/* ===== フォームリード文 ===== */
.request-form-lead {
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 2rem;
  font-size: .95rem;
  color: var(--req-ink);
  line-height: 1.9;
}

.request-form-lead__small {
  font-size: .82rem;
  color: var(--req-muted);
}

.request-form-lead__link {
  color: var(--req-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== フォーム ===== */
.request-form-wrap {
  max-width: 720px;
  margin-inline: auto;
}

/* ===== その他のご相談方法 ===== */
.request-section--sage {
  background: #ebf3ee;
}

/* Fixed: /contact の電話セクションはNext.js版（globals.cssの.section--soft、
   #f4f0e8のウォームアイボリー）を使っており、.request-section--sage（セージ
   グリーン #ebf3ee、資料請求ページの「その他のご相談方法」専用）とは別の背景色
   だったため、専用クラスを追加（理由: localhost:3000/contact との見比べで
   背景色の差異を指摘されたため）。 */
.request-section--soft {
  background: var(--req-soft);
}

.request-other-contact {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}

.request-other-contact__lead {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--req-ink);
  margin-bottom: 1.5rem;
}

.request-other-contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.request-other-contact__tel {
  font-size: .92rem;
  color: var(--req-muted);
}

.request-other-contact__tel a {
  color: var(--req-primary);
  font-weight: 700;
}

.request-other-contact__tel-note {
  margin-left: .4rem;
  font-size: .85rem;
}

.request-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: .68rem 1.75rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: .95rem;
  cursor: pointer;
}

.request-button--primary {
  background: var(--req-primary);
  color: #fff;
}

.request-button--outline {
  border-color: var(--req-primary);
  color: var(--req-primary);
  background: #fff;
}

.request-button--accent {
  background: var(--req-accent);
  color: #fff;
}

.request-button:hover {
  opacity: .85;
}

/* ===== MW WP Formが出力する既存マークアップの再スタイル ===== */
.request-form-wrap .mw_wp_form {
  display: block;
}

.request-form-wrap .form.fadeUpTrigger {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.request-form-wrap h3.hdg02 {
  background: var(--req-primary);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  padding: .75rem 1.5rem;
  letter-spacing: .03em;
  margin: 1.5rem 0 0;
  border-radius: 16px 0 0 0;
}

.request-form-wrap h3.hdg02:first-child {
  margin-top: 0;
}

.request-form-wrap dl {
  padding: 1.25rem 1.5rem;
  margin: 0;
  border: 1px solid var(--req-line);
  border-top: none;
}

.request-form-wrap h3.hdg02 + dl {
  border-radius: 0;
}

/* Fixed: 設問ごとにdlを分割した際、各グループの「最後のdl」の右下角にNext.js版と同じ16pxの丸みを
   付ける必要があるが、:last-of-typeはフォーム全体で最後の1個のdlにしか一致しないため、
   複数グループある場合は先頭グループの角丸が消えていた（理由: 次に<h3>が続くdl＝グループ最後のdl、
   をセレクタで判定して丸めるよう修正）。 */
.request-form-wrap dl:has(+ h3.hdg02),
.request-form-wrap dl:last-of-type {
  border-radius: 0 0 16px 16px;
}

.request-form-wrap dt {
  font-size: .9rem;
  font-weight: 700;
  color: var(--req-ink);
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}

/* Fixed: 新フォーム（ID 2800）はバッジ直後に改行を入れない本文へ整形済みのため、
   badge/ラベル分断を防ぐCSSハックは不要（理由: フォーム133は保持し、表示用に新フォームを追加したため）。 */

/* Fixed: 旧style.cssのレスポンシブ用ユーティリティクラス（.sp_550/.pc_550）が除外設定により
   読み込まれないため、フォーム本文（アンケート見出しの`<br class="sp_550">`）でのみ同等の挙動を再現
   （理由: 本文側の改行はNext.js版のスマホ表示での改行制御としてそのまま利用するため）。 */
.request-form-wrap .sp_550 {
  display: none;
}

@media (max-width: 550px) {
  .request-form-wrap .pc_550 {
    display: none;
  }

  .request-form-wrap .sp_550 {
    display: block;
  }
}

.request-form-wrap dt .req {
  display: inline-flex;
  align-items: center;
  background: var(--req-red);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .1rem .5rem;
  border-radius: 999px;
}

.request-form-wrap dt .opt {
  display: inline-flex;
  align-items: center;
  background: var(--req-line);
  color: var(--req-muted);
  font-size: .72rem;
  font-weight: 700;
  padding: .1rem .5rem;
  border-radius: 999px;
}

.request-form-wrap dd {
  margin: 0 0 1.25rem;
}

.request-form-wrap dd:last-child {
  margin-bottom: 0;
}

/* Fixed: 郵便番号・住所や複数の年齢/学年selectの間に挿入されたbrを間隔として可視化
   （理由: 単なる改行では入力欄同士が詰まって見えるため、Next.js版のfield間の余白に近づける）。 */
.request-form-wrap dd br {
  display: block;
  content: "";
  margin-top: .4rem;
}

.request-form-wrap input[type="text"],
.request-form-wrap select,
.request-form-wrap textarea {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--req-line);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--req-font-sans);
  background: var(--req-white);
  color: var(--req-ink);
  transition: border-color .2s;
  appearance: none;
}

.request-form-wrap input[type="text"]:focus,
.request-form-wrap select:focus,
.request-form-wrap textarea:focus {
  outline: none;
  border-color: var(--req-primary);
  box-shadow: 0 0 0 3px rgba(58, 147, 202, .12);
}

.request-form-wrap select {
  margin-bottom: .5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2355605e' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.request-form-wrap select:last-of-type {
  margin-bottom: 0;
}

.request-form-wrap select.size_m {
  max-width: 12rem;
}

/* Fixed: 「入学希望の方の年齢と学年」の年齢/学年/在学状況セレクトを横並びにする
   （新フォーム側で3つのselectを.req-select-groupでラップ済みのため、それをflex化する）。
   flex-basisを固定rem(9rem)にすると、フォーム幅が狭い場合に3つ目のselectが
   折り返してしまうため、flex-basisを0にして3等分・折り返し無しにする
   （理由: /contactで在学状況セレクトのみ2行目に落ちる不具合が確認されたため）。 */
.request-form-wrap .req-select-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: .75rem;
}

.request-form-wrap .req-select-group select {
  width: auto;
  flex: 1 1 0;
  min-width: 0;
  margin-bottom: 0;
}

/* Fixed: ネイティブ<select>のドロップダウンポップアップはOS/ブラウザ描画のためCSSで装飾できず、
   正本(Next.js版CustomSelect)と見た目が異なって見える問題を解消（理由: js/req-custom-select.js が
   元の<select>を非表示にし、同デザインのボタン+リストUIを被せて値を同期するため、その見た目を
   Next.js版CustomSelect.module.cssに合わせて再現する）。 */
.request-form-wrap .req-select {
  position: relative;
  margin-bottom: .5rem;
}

.request-form-wrap .req-select:last-of-type {
  margin-bottom: 0;
}

.request-form-wrap .req-select.size_m {
  max-width: 12rem;
}

.request-form-wrap .req-select-group .req-select {
  width: auto;
  flex: 1 1 0;
  min-width: 0;
  margin-bottom: 0;
}

.request-form-wrap .req-select select {
  display: none;
}

.request-form-wrap .req-select__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .7rem 1rem;
  border: 1.5px solid var(--req-line);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--req-font-sans);
  background: var(--req-white);
  color: var(--req-ink);
  cursor: pointer;
  text-align: left;
  transition: border-color .2s;
  appearance: none;
}

.request-form-wrap .req-select__trigger:focus,
.request-form-wrap .req-select__trigger.is-open {
  outline: none;
  border-color: var(--req-primary);
  box-shadow: 0 0 0 3px rgba(58, 147, 202, .12);
}

.request-form-wrap .req-select__trigger-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-form-wrap .req-select__trigger-text.is-placeholder {
  color: #aaa;
}

.request-form-wrap .req-select__chevron {
  flex-shrink: 0;
  color: #55605e;
  transition: transform .2s;
}

.request-form-wrap .req-select__chevron.is-open {
  transform: rotate(180deg);
}

.request-form-wrap .req-select__list {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  background: var(--req-white);
  border: 1.5px solid var(--req-line);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .14);
  z-index: 500;
  list-style: none;
  margin: 0;
  padding: .25rem 0;
  max-height: 220px;
  overflow-y: auto;
}

.request-form-wrap .req-select__option {
  padding: .65rem 1rem;
  font-size: .9rem;
  font-family: var(--req-font-sans);
  color: var(--req-ink);
  cursor: pointer;
  transition: background .12s;
}

.request-form-wrap .req-select__option:hover {
  background: var(--req-soft);
}

.request-form-wrap .req-select__option.is-selected {
  color: var(--req-primary);
  font-weight: 600;
}

.request-form-wrap textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.7;
}

/* Fixed: 郵便番号欄の下の補足文（Next.js版の.fieldNote相当）のスタイル
   （理由: MW WP Formのwpautop処理がブロックレベルの<p>タグと競合し閉じタグの位置がずれる不具合が
   あったため、<span>+display:blockで同等の見た目を安全に再現する）。 */
.request-form-wrap .request-field-note {
  display: block;
  font-size: .82rem;
  color: var(--req-muted);
  line-height: 1.7;
  margin: .5rem 0 0;
}

.request-form-wrap input[type="radio"] {
  accent-color: var(--req-primary);
  width: 1rem;
  height: 1rem;
  margin-right: .4rem;
}

.request-form-wrap input[type="checkbox"] {
  accent-color: var(--req-primary);
  width: 1.1rem;
  height: 1.1rem;
  margin-right: .6rem;
  flex-shrink: 0;
}

/* Fixed: Next.js版はラジオ(.radios)が横並びwrap、チェックボックス(.checkboxGroup)は縦積みと
   レイアウトが異なるため、それぞれ個別に再現する（理由: 現状は両方とも横並びで統一されており
   font-sizeやレイアウトがNext.js版と差異があったため）。 */
.request-form-wrap dd .mwform-radio-field {
  display: inline-flex;
  align-items: center;
  font-size: .95rem;
  margin: 0 1rem .5rem 0;
}

.request-form-wrap dd .mwform-checkbox-field {
  display: flex;
  align-items: center;
  font-size: .95rem;
  margin: 0 0 .6rem;
}

/* Fixed: ラジオ/チェックボックスのラベルテキストがinputよりわずかに下にずれて見える問題を解消
   （理由: .mwform-radio-field/.mwform-checkbox-fieldはflexだが、実際にinputとテキストを
   包んでいる内側の<label>要素自体はflex化されておらずinline要素同士のbaseline揃えになるため、
   inputの下端とテキストのベースラインがずれていた。labelもflex化してcenter揃えにする）。 */
.request-form-wrap dd .mwform-radio-field label,
.request-form-wrap dd .mwform-checkbox-field label {
  display: inline-flex;
  align-items: center;
}

.request-form-wrap dd:has(.mwform-checkbox-field) {
  display: flex;
  flex-direction: column;
}

/* Fixed: MW WP Formプラグイン標準CSS（.mw_wp_form .horizontal-item + .horizontal-item {margin-left:10px}）
   はチェックボックスが横並びであることを前提にしており、縦積みに変更した本フォームでは不要な
   左マージンとして残ってしまう（理由: プラグイン側CSSは変更せず、テーマ側で上書きして無効化するため）。 */
.request-form-wrap dd .horizontal-item + .horizontal-item {
  margin-left: 0;
}

.request-form-wrap .privacy .mwform-checkbox-field {
  margin-bottom: 0;
}

/* Fixed: Next.js版のプライバシー同意欄は背景ボックスなしの単純な.field構造（テキスト+チェックボックス
   のみ）だったため、装飾されたボックス（背景色・角丸）を取り除き、他のfield同様のシンプルな余白のみに
   揃える（理由: HTML/デザインの見た目差分を解消するため）。 */
.request-form-wrap .privacy {
  margin-top: 1.5rem;
}

.request-form-wrap .privacy .request-field-note {
  margin-bottom: .5rem;
}

.request-form-wrap .privacy a {
  color: var(--req-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Fixed: labelがflex(align-items:center)化されたことでinput/テキストは自動で中央揃えになる
   ため、以前この単一行チェックボックスに付けていたmargin-top:.35remは不要（むしろずれを生む）
   なので削除する（理由: 上のmwform-radio-field/mwform-checkbox-field label flex化に伴う整理）。 */.request-form-wrap .btn02.form_button {
  display: flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: .68rem 1.75rem;
  margin-inline: auto;
  margin-top: 1.5rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  background: var(--req-primary);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
}

.request-form-wrap .btn02.form_button:hover {
  opacity: .85;
}

/* Fixed: Next.js版の送信ボタンは.actions{display:flex;justify-content:center}で中央寄せされているが、
   実際のMW WP Form出力ではボタンが<p>で囲まれず<button>が.mw_wp_form直下に単体で出力される
   ケースがあり、以前の p:has() セレクタでは対応できず左寄せのままだった
   （理由: contact/application双方でボタンが<p>で囲まれていないことを確認したため。
   ボタン自体をdisplay:flexのブロックボックス化しmargin-inline:autoで中央寄せする）。 */
.request-form-wrap p:has(> .btn02.form_button) {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.request-form-wrap p:has(> .btn02.form_button) .btn02.form_button {
  margin-top: 0;
}

.request-form-wrap p:has(> .btn02.form_button) br {
  display: none;
}

.request-form-wrap .error,
.request-form-wrap .mwform-error-message {
  font-size: .8rem;
  color: #e05555;
  margin-top: .35rem;
}

/* ===== 送信完了画面 ===== */
/* Fixed: Next.js版には/request/thanksという独立ページが存在せず、フォーム送信後に同一ページ内で
   .successコンポーネントへ状態切り替えする仕様のため、直接比較できるURLはない。
   .success/.successIcon/.successMsgのCSSトークンを正としてmax-width/paddingを合わせる
   （理由: 唯一参照可能なデザイン定義であるため、フォント・余白の値をそのまま踏襲する）。 */
.request-thanks {
  text-align: center;
  max-width: 560px;
  margin-inline: auto;
  padding: 3rem 2rem;
}

.request-thanks__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--req-primary);
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.request-thanks__msg,
.request-module__kamIaa__successMsg {
  font-size: .95rem;
  color: var(--req-muted);
  line-height: 1.85;
  margin-bottom: 1.25rem;
}

.request-thanks__tel {
  background: var(--req-soft);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.request-thanks__tel-label {
  font-size: .85rem;
  color: var(--req-muted);
  margin-bottom: .25rem;
}

.request-thanks__tel-number {
  display: inline-block;
  color: var(--req-primary);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 700;
  letter-spacing: .02em;
}

.request-thanks__tel-note {
  font-size: .8rem;
  color: var(--req-muted);
  margin-top: .35rem;
}

/* ===== レスポンシブ ===== */
@media (max-width: 640px) {
  .request-pc-br {
    display: none;
  }

  .request-form-wrap dl,
  .request-form-wrap h3.hdg02 {
    padding: 1rem;
  }

  .request-other-contact__actions .request-button {
    width: 100%;
  }
}

/* Fixed: Next.js版に合わせ、狭幅時はplaceholderとセレクトの文字サイズを少し縮小する
   （理由: フォント関連の見た目差分を解消するため、フォーム部分にNext.js版と同じレスポンシブ調整を追加）。 */
@media (max-width: 860px) {
  .request-form-wrap input[type="text"]::placeholder {
    font-size: .78rem;
  }

  .request-form-wrap .req-select-group select {
    font-size: .9rem;
    padding: .6rem 2rem .6rem .6rem;
  }
}
