/*
Theme Name: mathlibaty-2606
Theme URI: https://example.com/
Author: mathlibaty
Description: 数学教室マスリバティ SPトップ用テーマ（Figma SP 準拠）
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mathlibaty-2606
*/

/* SP カラム最大 480px。480px 以下のビューポートでは .site がウィンドウ幅いっぱい（100%）になる */

*,
*::before,
*::after {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

html {
  scroll-padding-top: 53px;
}

body.admin-bar html {
  scroll-padding-top: 85px;
}

@media screen and (max-width: 782px) {
  body.admin-bar html {
    scroll-padding-top: 99px;
  }
}

.site-body {
  margin: 0;
  background: #f5f5f5;
  color: #000;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: inherit;
  text-decoration: none;
}

:root {
  --color-primary: #b6121d;
  --color-primary-dark: #980b14;
  --color-primary-tint: #ffd3d6;
  --color-course-exam-primary: #b6121d;
  --color-course-exam-dark: #980b14;
  --color-course-habit-primary: #000c6e;
  --color-course-habit-dark: #000848;
}

.site {
  --site-col-width: 480px;
  --header-height: 53px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding-top: var(--header-height);
  background: #fff;
  position: relative;
  box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.1);
}

@media (min-width: 481px) {
  .site {
    width: var(--site-col-width);
    max-width: 100%;
  }
}

body.admin-bar .site {
  padding-top: calc(var(--header-height) + 32px);
}

@media screen and (max-width: 782px) {
  body.admin-bar .site {
    padding-top: calc(var(--header-height) + 46px);
  }
}

.side-menu-wrap {
  display: none;
}

.sub-contents {
  display: none;
}

/* ----- header ----- */
.header {
  position: fixed;
  top: 0;
  left: max(0px, calc((100vw - min(var(--site-col-width), 100vw)) / 2));
  z-index: 100;
  width: min(var(--site-col-width), 100vw);
  max-width: 100%;
  border-bottom: 1px solid #ddd;
  background: #fff;
  box-sizing: border-box;
}

body.admin-bar .header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .header {
    top: 46px;
  }
}

.header__inner {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 53px;
  background: #fff;
}

.header__logo {
  flex: 1;
  padding: 10px;
}

.header__logo-img {
  display: block;
  width: 100%;
  max-width: 122px;
  height: auto;
}

.header__actions {
  display: flex;
  align-items: center;
}

.header__cv {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 53px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.448;
  white-space: nowrap;
}

.header__cv-amp {
  font-size: 10px;
}

.header__menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 53px;
  height: 53px;
  padding: 10px;
  border: 1px solid #000;
  background: #000;
  cursor: pointer;
}

/* 1px の実寸を持たせて transform-origin が安定する（border-top のみだと高さ0になりやすい） */
.header__menu-line {
  display: block;
  width: 20px;
  height: 1px;
  flex-shrink: 0;
  background-color: #fff;
  transform-origin: 50% 50%;
  transition: transform 0.3s ease, opacity 0.25s ease;
}

/* 展開時: 上線は下へ＋45°、下線は上へ−45°、中央は非表示 → × */
body.body--nav-open .header__menu-line:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

body.body--nav-open .header__menu-line:nth-child(2) {
  opacity: 0;
}

body.body--nav-open .header__menu-line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
  .header__menu-line {
    transition-duration: 0.01ms;
  }
}

.body--nav-open {
  overflow: hidden;
}

/* ハンバーガー直下にメニューをスライド展開（.header 基準で absolute） */
.mobile-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 1;
  width: 100%;
  pointer-events: none;
}

.mobile-nav--open {
  pointer-events: auto;
}

/* .site と同じ幅・同じ左右位置に収める（全幅 fixed ではなく中央カラムのみ） */
.mobile-nav__backdrop {
  position: fixed;
  top: var(--header-height);
  bottom: 0;
  z-index: 0;
  width: min(var(--site-col-width), 100vw);
  left: max(0px, calc((100vw - min(var(--site-col-width), 100vw)) / 2));
  right: auto;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

body.admin-bar .mobile-nav__backdrop {
  top: calc(var(--header-height) + 32px);
}

@media screen and (max-width: 782px) {
  body.admin-bar .mobile-nav__backdrop {
    top: calc(var(--header-height) + 46px);
  }
}

.mobile-nav--open .mobile-nav__backdrop {
  opacity: 1;
  visibility: visible;
}

/* 外側のみ max-height をアニメーション（padding は内側へ分離して開閉時のガクつきを防ぐ） */
.mobile-nav__menu {
  position: relative;
  z-index: 1;
  max-height: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  background: #fff;
  border-top: 1px solid #ddd;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  transition: max-height 0.35s ease;
  box-sizing: border-box;
}

.mobile-nav--open .mobile-nav__menu {
  max-height: min(75vh, 640px);
  overflow-y: auto;
}

.mobile-nav__menu-inner {
  display: flex;
  flex-direction: column;
  padding: 30px;
  box-sizing: border-box;
}

.mobile-nav__link {
  position: relative;
  display: block;
  padding: 15px 36px 15px 0;
  border-bottom: 1px solid #ececec;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: #000;
}

.mobile-nav__link:last-child {
  border-bottom: none;
}

/* 下向き三角（キャプチャの矢印イメージ） */
.mobile-nav__link::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #b5b5b5;
  transform: translateY(-50%);
  pointer-events: none;
}

/* ----- mv ----- */
.mv {
  position: relative;
  width: 100%;
  overflow: visible;
  line-height: 0;
}

.mv::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 159px;
  height: 129px;
  transform: translateX(-50%);
  background-color: var(--color-primary);
  -webkit-mask: url("img/img_mv_tree.svg") no-repeat center / contain;
  mask: url("img/img_mv_tree.svg") no-repeat center / contain;
  pointer-events: none;
}

.mv__img {
  display: block;
  width: 100%;
  height: auto;
}

/* ----- section base ----- */
.section__inner {
  width: 100%;
}

.section-heading__label {
  margin: 0;
  font-family: "Shippori Mincho", serif;
  font-size: 20px;
  line-height: 1.448;
  color: var(--color-primary);
  text-align: center;
}

.section-heading__title {
  margin: 0;
  font-family: "Shippori Mincho", serif;
  font-weight: 400;
  font-size: 38px;
  line-height: 1.448;
  color: var(--color-primary);
  text-align: center;
}

/* 学習コース以降のセクション見出し（共通） */
.section-title {
  margin: 0 0 30px;
  font-family: "Shippori Mincho", serif;
  font-weight: 400;
  font-size: 38px;
  line-height: 1.448;
  color: #000;
}

.section-title--center {
  text-align: center;
}

.section-title__amp {
  font-size: 0.74em;
}

/* 内側ブロックが #f5f5f5 のとき、見出しの margin-bottom が隣接要素と相殺され
   親が透過のままだと .site（#fff）が見えるため、section 側でも同色を敷く */
.section--voices,
.section--teacher,
.section--media,
.section--faq,
.section--flow,
.section--news {
  background-color: #f5f5f5;
}

/* セクションブロック：上下余白（管理画面で ON/OFF） */
.mathlibaty-pad-top {
  padding-top: 60px;
}

.mathlibaty-pad-bottom {
  padding-bottom: 60px;
}

/* 余白 ON 時は padding 領域まで背景を塗る（子 margin 相殺対策含む） */
.mathlibaty-pad-surface-gray.mathlibaty-pad-top,
.mathlibaty-pad-surface-gray.mathlibaty-pad-bottom {
  display: flow-root;
  background-color: #f5f5f5;
}

.mathlibaty-pad-surface-white.mathlibaty-pad-top,
.mathlibaty-pad-surface-white.mathlibaty-pad-bottom {
  display: flow-root;
  background-color: #fff;
}

.mathlibaty-pad-surface-red.mathlibaty-pad-top,
.mathlibaty-pad-surface-red.mathlibaty-pad-bottom {
  display: flow-root;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

/* ----- front page (block content) ----- */
.front-page-content {
  display: contents;
}

.front-page-content > .wp-block-mathlibaty-mv,
.front-page-content > .wp-block-mathlibaty-intro,
.front-page-content > .wp-block-mathlibaty-features,
.front-page-content > .wp-block-mathlibaty-message,
.front-page-content > .wp-block-mathlibaty-courses,
.front-page-content > .wp-block-mathlibaty-cta,
.front-page-content > .wp-block-mathlibaty-voices,
.front-page-content > .wp-block-mathlibaty-teacher,
.front-page-content > .wp-block-mathlibaty-media,
.front-page-content > .wp-block-mathlibaty-classroom,
.front-page-content > .wp-block-mathlibaty-faq,
.front-page-content > .wp-block-mathlibaty-flow,
.front-page-content > .wp-block-mathlibaty-apply,
.front-page-content > .wp-block-mathlibaty-news,
.front-page-content > [class*="wp-block-"]:not([class*="wp-block-mathlibaty"]) {
  display: block;
  margin: 0;
}

.front-page-content > [class*="wp-block-"]:not([class*="wp-block-mathlibaty"]) {
  max-width: var(--site-col-width, 480px);
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  font-size: 16px;
  color: #333;
}

/* ブロックエディタ内プレビュー */
.mathlibaty-intro-editor .components-placeholder {
  min-height: 0;
}

.mathlibaty-features-editor .components-placeholder {
  min-height: 0;
}

.mathlibaty-message-editor .components-placeholder {
  min-height: 0;
}

.mathlibaty-courses-editor .components-placeholder {
  min-height: 0;
}

.mathlibaty-cta-editor .components-placeholder {
  min-height: 0;
}

/* 申込フォーム：エディタプレビュー内の入力欄は操作不可 */
.mathlibaty-apply-editor,
.mathlibaty-apply-editor .section--apply,
.mathlibaty-apply-editor .section--apply * {
  pointer-events: none;
  user-select: none;
}

.mathlibaty-apply-editor .section--apply input,
.mathlibaty-apply-editor .section--apply select,
.mathlibaty-apply-editor .section--apply textarea,
.mathlibaty-apply-editor .section--apply button {
  cursor: default;
}

.mathlibaty-voices-editor .components-placeholder {
  min-height: 0;
}

.mathlibaty-voices-editor-preview.section--voices {
  margin: 0;
  pointer-events: none;
}

.mathlibaty-teacher-editor .components-placeholder {
  min-height: 0;
}

.mathlibaty-teacher-editor-preview.section--teacher {
  margin: 0;
  pointer-events: none;
}

.mathlibaty-media-editor .components-placeholder {
  min-height: 0;
}

.mathlibaty-media-editor-preview.section--media {
  margin: 0;
  pointer-events: none;
}

.mathlibaty-classroom-editor .components-placeholder {
  min-height: 0;
}

.mathlibaty-classroom-editor-preview.section--classroom {
  margin: 0;
  pointer-events: none;
}

.mathlibaty-classroom-editor-preview .classroom__slider {
  overflow: hidden;
}

.mathlibaty-classroom-editor-preview .classroom__slide {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 375 / 250;
}

.mathlibaty-classroom-editor-preview .classroom__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mathlibaty-classroom-editor-preview .classroom__indicators .classroom__indicator {
  display: inline-block;
}

.mathlibaty-faq-editor .components-placeholder {
  min-height: 0;
}

.mathlibaty-faq-editor-preview.section--faq {
  margin: 0;
  pointer-events: none;
}

.mathlibaty-faq-editor-preview .faq-item__q {
  cursor: default;
}

.mathlibaty-flow-editor .components-placeholder {
  min-height: 0;
}

.mathlibaty-flow-editor-preview.section--flow {
  margin: 0;
  pointer-events: none;
}

/* ----- intro (gradient) ----- */
.section--intro {
  position: relative;
  overflow: visible;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.section__inner--intro {
  padding: 40px 20px 0;
}

.section__inner--intro.mathlibaty-pad-top {
  padding-top: 60px;
}

.section__inner--intro.mathlibaty-pad-bottom {
  padding-bottom: 60px;
}

.intro__title {
  margin: 0 0 15px;
  padding: 0 0 0 var(--intro-title-padding-left, 7%);
  font-family: "Shippori Mincho", serif;
  font-weight: 400;
  font-size: 43px;
  line-height: 1.448;
  color: #fff;
  text-align: center;
}

.intro__lead {
  margin: 0 0 30px;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  color: #fff;
}

.intro__result {
  padding: 30px;
  background: #fff;
  border-radius: 4px;
}

.intro__result-heading {
  margin: 0 0 20px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 400;
  color: #000;
  text-align: center;
}

.intro__result-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 15px;
}

.intro__result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.intro__result-label {
  font-family: "Shippori Mincho", serif;
  font-size: 28px;
  line-height: 1.448;
  color: #000;
  white-space: nowrap;
  flex-shrink: 0;
}

.intro__result-num {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: 267px;
  font-family: "Shippori Mincho", serif;
  color: var(--color-primary);
}

.intro__result-num-main {
  font-size: 28px;
  line-height: 1.448;
}

.intro__result-unit {
  font-size: 20px;
  line-height: 1.448;
  color: #000;
  margin-left: 4px;
}

.intro__schools {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.intro__school-head {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 10px;
}

.intro__school-line {
  flex: 1;
  height: 0;
  border-top: 1px solid var(--color-primary);
}

.intro__school-name {
  padding: 0 8px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.448;
  color: var(--color-primary);
  white-space: nowrap;
}

.intro__school-text {
  margin: 0;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.3;
  color: #606060;
}

.intro__note {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  color: #fff;
}

/* ----- features ----- */
.section__inner--features {
  padding-left: 40px;
  padding-right: 40px;
}

.section--features .section-heading {
  margin-bottom: 30px;
}

.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.feature-list__head {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.feature-list__point {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: var(--color-primary);
  border-radius: 2px;
  gap: 1px;
}

.feature-list__point-label {
  font-weight: 500;
  font-size: 10px;
  line-height: 1;
  color: #fff;
}

.feature-list__point-num {
  font-weight: 500;
  font-size: 28px;
  line-height: 1;
  color: #fff;
  margin-top: 0;
}

.feature-list__catch {
  margin: 0;
  flex: 1;
  align-self: flex-start;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.4;
  color: #000;
}

.feature-list__thumb {
  width: 100%;
  margin-top: 30px;
  border-radius: 2px;
  overflow: hidden;
  line-height: 0;
}

.feature-list__img {
  display: block;
  width: 100%;
  height: auto;
}

.feature-list__text {
  margin: 20px 0 0;
  font-size: 15px;
  line-height: 2.2;
  color: #000;
}

/* ----- message ----- */
.section--message {
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.section__inner--message {
  padding-left: 40px;
  padding-right: 40px;
}

.message__title {
  margin: 0 0 40px;
  padding: 0 0 0 var(--message-title-padding-left, 1em);
  font-family: "Shippori Mincho", serif;
  font-weight: 400;
  font-size: 36px;
  line-height: 1.448;
  text-align: center;
  color: #fff;
}

.message__text {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 2.2;
  color: #fff;
}

/* ----- course nav ----- */
.section--course-nav {
  padding-left: 0;
  padding-right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #fff;
}

/* 見出しエリアは白のまま（上余白 ON 時もグレーにしない） */
.section--course-nav.mathlibaty-pad-top,
.section--course-nav.mathlibaty-pad-surface-gray,
.section--course-nav.mathlibaty-pad-surface-white {
  background-color: #fff;
}

.course-nav__tabs {
  display: flex;
  width: 100%;
  gap: 10px;
  padding: 0 15px 30px;
}

.course-nav__tab {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px 0 35px;
  border-radius: 4px;
  font-size: 18px;
  line-height: 1.2;
  text-align: center;
  color: #fff;
  border: 2px solid #fff;
  background: linear-gradient(90deg, var(--color-course-exam-primary) 0%, var(--color-course-exam-dark) 100%);
}

/* 下向き矢印：外枠13×5・1px白線（::before + ::after で二重三角形） */
.course-nav__tab::before,
.course-nav__tab::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  pointer-events: none;
}

.course-nav__tab::before {
  bottom: 15px;
  border-width: 5px calc(13px / 2) 0 calc(13px / 2);
  border-color: #fff transparent transparent transparent;
  z-index: 1;
}

.course-nav__tab::after {
  bottom: 16px;
  border-width: 4px calc(11px / 2) 0 calc(11px / 2);
  border-color: var(--color-course-exam-dark) transparent transparent transparent;
  z-index: 2;
}

.course-nav__tab--habit::after {
  border-top-color: var(--color-course-habit-primary);
}

.course-nav__tab--habit {
  background: linear-gradient(90deg, var(--color-course-habit-primary) 0%, var(--color-course-habit-dark) 100%);
}

.course-nav__tab--active {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* ----- course blocks ----- */
.course-block__hero {
  position: relative;
  background: #f2f2f2;
}

.course-block__hero-frame {
  width: 100%;
  max-width: var(--site-col-width);
  margin: 0 auto;
  border-top: 4px solid var(--color-course-exam-primary);
}

img.course-block__hero-frame {
  display: block;
  height: auto;
}

.course-block__hero-frame--habit {
  border-top-color: var(--color-course-habit-primary);
}

.course-block__body {
  position: relative;
  padding: 0 40px;
  background: #f5f5f5;
}

/* 受験対策コースのみ：下余白固定（編集不可） */
#course-exam .course-block__body,
.course-block__body--exam {
  padding-bottom: 60px;
}

.course-block__badge {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 66px;
  padding: 0 20px;
  margin-bottom: 0;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: #fff;
  text-align: center;
}

.course-block__badge-aoharu {
  font-size: 11px;
  line-height: 1.3;
}

.course-block__badge--exam {
  position: absolute;
  left: 50%;
  bottom: -35px;
  z-index: 2;
  width: 260px;
  max-width: calc(100% - 40px);
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--color-course-exam-primary) 0%, var(--color-course-exam-dark) 100%);
}

.course-block__badge--habit {
  position: absolute;
  left: 50%;
  bottom: -35px;
  z-index: 2;
  width: 260px;
  max-width: calc(100% - 40px);
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--color-course-habit-primary) 0%, var(--color-course-habit-dark) 100%);
}

.course-block__lead {
  margin: 0;
  padding: 60px 0 0;
  font-size: 15px;
  line-height: 2.2;
  color: #000;
}

.course-block__target {
  margin-top: 24px;
}

.course-block__target-title {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 16px;
  padding: 0 0 1px;
  border-bottom: 1px solid var(--color-course-exam-primary);
  font-weight: 700;
  font-size: 18px;
  line-height: 2.2;
  text-align: center;
  color: var(--color-course-exam-primary);
}

.course-block__target-title--habit {
  color: var(--color-course-habit-primary);
  border-bottom-color: var(--color-course-habit-primary);
}

.course-target-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.course-target-list__item {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 71px;
  padding: 16px 16px 16px 55px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: #000;
}

.course-target-list__icon {
  position: absolute;
  left: 19px;
  top: 50%;
  transform: translateY(-50%);
  width: 25px;
  height: 25px;
}

.course-table {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.course-table__row {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.course-table__th {
  flex: 0 0 60px;
  display: flex;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.2;
  color: #000;
}

.course-table__td {
  flex: 1;
  display: flex;
  align-items: center;
  padding-left: 16px;
  font-size: 15px;
  line-height: 1.2;
  color: #000;
}

.course-table__row--stack .course-table__td--stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.course-table__price {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

.course-table__note {
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
}

.course-block__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 24px;
  padding: 28px 40px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.448;
  text-align: center;
  border: 2px solid var(--color-course-exam-primary);
  color: var(--color-course-exam-primary);
  background: #fff;
}

.course-block__btn::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 32px;
  width: 5px;
  height: 13px;
  background-color: currentColor;
  transform: translateY(-50%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='5' height='13' viewBox='0 0 5 13' fill='none'%3E%3Cpath d='M0.5 0.5L4.5 6.5L0.5 12.5' stroke='black'/%3E%3C/svg%3E")
    center / 5px 13px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='5' height='13' viewBox='0 0 5 13' fill='none'%3E%3Cpath d='M0.5 0.5L4.5 6.5L0.5 12.5' stroke='black'/%3E%3C/svg%3E")
    center / 5px 13px no-repeat;
  pointer-events: none;
}

.course-block__btn--habit {
  border-color: var(--color-course-habit-primary);
  color: var(--color-course-habit-primary);
}

.course-block__btn--outline {
  border-color: #000;
  color: #000;
  background: #fff;
}

/* ----- cta ----- */
.cta {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: var(--site-col-width);
  margin: 0 auto;
  min-height: 220px;
  overflow: hidden;
}

.cta__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.cta__overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 50px 40px;
  width: 100%;
  flex: 1 1 auto;
  min-height: 220px;
  background: rgba(0, 0, 0, 0.6);
}

.cta__text {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  text-align: center;
  color: #fff;
}

.cta__btn {
  width: 100%;
  padding: 16px 30px;
  border-radius: 9999px;
  border: 2px solid #fff;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.4);
}

.cta__btn-amp {
  font-size: 18px;
}

/* ----- voices ----- */
.section__inner--voices-top {
  padding-left: 20px;
  padding-right: 20px;
  background: #f5f5f5;
}

.section__inner--voices {
  padding-left: 20px;
  padding-right: 20px;
  background: #f5f5f5;
}

.voices-group {
  margin-bottom: 36px;
}

.voices-group__title {
  margin: 0 0 28px;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.448;
  color: var(--color-primary);
  text-align: center;
}

.voice-card {
  margin-bottom: 20px;
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.voice-card__head {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px 20px;
  background: linear-gradient(90deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  border-radius: 3px 3px 0 0;
}

.voice-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.voice-card__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.voice-card__course {
  display: inline-block;
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  padding: 4px 10px;
  border: 1px solid #fff;
  font-size: 13px;
  line-height: 1.2;
  color: #fff;
}

.voice-card__who {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.448;
  color: #fff;
}

.voice-card__body {
  padding: 16px;
}

.voice-card__catch {
  margin: 0 0 11px;
  padding-bottom: 15px;
  border-bottom: 1px solid #d0d0d0;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.448;
  color: #000;
}

.voice-card__text {
  margin: 0;
  font-size: 15px;
  line-height: 2.2;
  color: #000;
}

.voice-quote {
  margin-bottom: 0;
  padding-bottom: 20px;
}

.voice-quote--border {
  border-top: none;
}

.voice-quote__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 0 20px 10px;
}

.voice-quote__avatar {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.voice-quote__meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.voice-quote__course {
  font-size: 15px;
  line-height: 1.2;
  color: var(--color-primary);
}

.voice-quote__name {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.448;
  color: var(--color-primary);
}

.voice-quote__text {
  margin: 0 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #d0d0d0;
  font-size: 15px;
  line-height: 2.2;
  color: #000;
}

/* ----- teacher ----- */
.section__inner--teacher {
  padding-left: 20px;
  padding-right: 20px;
  background: #f5f5f5;
}

.teacher-card__photo-wrap {
  width: calc(100% + 40px);
  margin: 30px -20px 0;
}

.teacher-card__photo {
  display: block;
  width: 100%;
  height: auto;
}

.teacher-card__panel {
  position: relative;
  z-index: 1;
  margin: -88.5px 20px 0;
  padding: 25px 30px 0;
  background: #fff;
  border-top: 2px solid var(--color-primary);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.teacher-card__panel-head {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid #ddd;
}

.teacher-card__name {
  font-size: 29px;
  line-height: 1.2;
  color: var(--color-primary);
}

.teacher-card__kana {
  font-size: 15px;
  line-height: 1.2;
  color: var(--color-primary);
  padding-bottom: 5px;
}

.teacher-card__role {
  margin: 0;
  padding: 10px 0 20px;
  font-size: 13px;
  line-height: 1.6;
  color: #000;
}

.teacher-card__bio {
  margin: 0 -30px;
  padding: 20px 30px 30px;
  background: var(--color-primary);
  font-size: 15px;
  line-height: 2.2;
  color: #fff;
}

/* ----- media ----- */
.section__inner--media {
  padding-left: 20px;
  padding-right: 20px;
  background: #f5f5f5;
}

.media-list {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  width: 100%;
  max-width: 100%;
}

.media-list__item {
  position: relative;
  padding: 14px 10px 14px 24px;
  border-top: 1px solid #ddd;
  font-size: 15px;
  line-height: 1.6;
  color: #000;
}

.media-list__item::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #000;
}

.media-list__more {
  margin: 30px 0 0;
  padding: 18px 10px;
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  text-align: center;
  font-size: 15px;
  line-height: 1.2;
  color: var(--color-primary);
}

/* ----- classroom ----- */
.section__inner--classroom {
  padding-left: 20px;
  padding-right: 20px;
  background: #fff;
}

.classroom__visual {
  margin-top: 30px;
  width: calc(100% + 40px);
  margin-left: -20px;
  margin-right: -20px;
  text-align: center;
}

.classroom__slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pinch-zoom;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.classroom__slider::-webkit-scrollbar {
  display: none;
}

.classroom__slide {
  flex: 0 0 auto;
  aspect-ratio: 375 / 250;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.classroom__photo {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
}

.classroom__indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.classroom__indicator {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #d9d9d9;
  cursor: pointer;
}

.classroom__indicator.is-active {
  background: #000;
}

.classroom-dl {
  margin: 30px 0 0;
}

.classroom-dl__row {
  padding: 20px 0;
  border-top: 1px solid #ddd;
}

.classroom-dl__row:first-child {
  border-top: 1px solid #ddd;
}

.classroom-dl__dt {
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.448;
  color: var(--color-primary);
}

.classroom-dl__dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #000;
}

.classroom-dl__dd a {
  color: #00a7ff;
  text-decoration: underline;
}

.classroom-dl__map {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin-top: 10px;
}

/* ----- faq ----- */
.section__inner--faq {
  padding-left: 20px;
  padding-right: 20px;
  background: #f5f5f5;
}

.faq-item {
  margin-top: 20px;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

.faq-item + .faq-item {
  margin-top: 10px;
}

.faq-item__q {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 100%;
  padding: 20px;
  border: 0;
  background: transparent;
  font: inherit;
  color: #000;
  text-align: left;
  cursor: pointer;
}

.faq-item__q:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.faq-item__q-mark {
  flex-shrink: 0;
  font-size: 16px;
  color: var(--color-primary);
}

.faq-item__q-text {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 8px;
  color: #000;
  text-align: left;
}

.faq-item__toggle {
  --faq-toggle-size: 14px;
  --faq-toggle-stroke: 1px;
  flex-shrink: 0;
  margin-left: auto;
  position: relative;
  width: var(--faq-toggle-size);
  height: var(--faq-toggle-size);
}

.faq-item__toggle::before,
.faq-item__toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--faq-toggle-size);
  height: var(--faq-toggle-stroke);
  background: #000;
  transform: translate(-50%, -50%);
}

.faq-item__toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 1;
}

.faq-item--open .faq-item__toggle::after {
  opacity: 0;
}

/* 以前の .faq-item__a に相当: border-top #ddd + 上下左右 20px 相当の余白 */
.faq-item__panel {
  box-sizing: border-box;
  overflow: hidden;
  border-top: 0 solid #ddd;
  padding: 0;
  margin: 0 20px;
  transition:
    border-top 0.3s ease-out,
    padding 0.3s ease-out;
}

.faq-item--open .faq-item__panel {
  border-top: 1px solid #ddd;
  padding: 20px 0;
  margin: 0 20px;
}

/* 参考: li > p — line-height / opacity / visibility */
.faq-item__a-mark,
.faq-item__a-text {
  margin: 0;
  line-height: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    line-height 0.3s ease-out,
    opacity 0.1s linear,
    visibility 0.1s linear;
}

.faq-item--open .faq-item__a-mark,
.faq-item--open .faq-item__a-text {
  opacity: 1;
  visibility: visible;
  transition:
    line-height 0.3s ease-out,
    opacity 0.1s linear 0.1s,
    visibility 0.1s linear 0.1s;
}

.faq-item--open .faq-item__a-mark {
  line-height: 1.2;
}

.faq-item--open .faq-item__a-text {
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  .faq-item__panel,
  .faq-item__a-mark,
  .faq-item__a-text {
    transition-duration: 0.01ms;
    transition-delay: 0s !important;
  }
}

.faq-item__a {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin: 0;
  padding: 0;
}

.faq-item__a-mark {
  font-size: 16px;
  color: #000;
}

.faq-item__a-text {
  flex: 1;
  font-size: 15px;
  color: #000;
}

/* ----- flow ----- */
.section__inner--flow {
  padding-left: 20px;
  padding-right: 20px;
  background: #f5f5f5;
}

.flow-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: flow;
}

.flow-list__item {
  position: relative;
  margin: 0;
  padding: 20px;
  background: #fff;
  border-radius: 0;
}

.flow-list__item:not(:last-child) {
  margin-bottom: 28px;
}

.flow-list__item:not(:last-child)::after {
  content: "";
  position: absolute;
  bottom: -19px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 8px solid #6c6c6c;
}

.flow-list__head {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.flow-list__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.448;
  border-radius: 2px;
}

.flow-list__label {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  color: var(--color-primary);
}

.flow-list__text {
  margin: 0;
  font-size: 15px;
  line-height: 2.2;
  color: #000;
}

/* ----- apply / CF7 ----- */
.section--apply {
  background: #fff;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

.section__inner--apply {
  padding-left: 20px;
  padding-right: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* 旧 .apply-form と CF7 テンプレートの .c-form を併記 */
.apply-form__field,
.section--apply .c-form__row {
  margin-bottom: 30px;
  min-width: 0;
  max-width: 100%;
}

.apply-form__label-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.apply-form__label,
.section--apply .c-form__label {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.448;
  color: #000;
}

.section--apply .c-form__label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  cursor: default;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* CF7 が行直下に挿入する <p>（デフォルトマージン・幅のはみ出し対策） */
.section--apply .c-form__row > p {
  margin: 0;
  padding: 0;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.apply-form__label--solo {
  display: block;
  margin-bottom: 12px;
}

.apply-form__badge,
.section--apply .c-form__label .req {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  background: var(--color-primary);
  color: #fff;
  font-size: 16px;
  line-height: 1.2;
  border-radius: 2px;
}

.apply-form__input,
.apply-form__textarea,
.section--apply .c-form__row input.wpcf7-form-control:not([type="checkbox"]):not([type="submit"]):not([type="button"]),
.section--apply .c-form__row select.wpcf7-form-control,
.section--apply .c-form__row textarea.wpcf7-form-control {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 15px;
  border: 1px solid #cdcdcd;
  border-radius: 0;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.2;
  color: #000;
  box-sizing: border-box;
}

.apply-form__input::placeholder,
.apply-form__textarea::placeholder,
.section--apply .c-form__row input.wpcf7-form-control:not([type="checkbox"]):not([type="submit"]):not([type="button"])::placeholder,
.section--apply .c-form__row select.wpcf7-form-control::placeholder,
.section--apply .c-form__row textarea.wpcf7-form-control::placeholder {
  color: #d0d0d0;
}

.apply-form__input--select {
  appearance: none;
  border-color: #000;
  color: #000;
}

.apply-form__select-wrap {
  position: relative;
}

.apply-form__select-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  transform: rotate(45deg);
  pointer-events: none;
}

.apply-form__checks,
.section--apply .c-form__row .wpcf7-checkbox {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
}

.apply-form__check,
.section--apply .c-form__row .wpcf7-checkbox .wpcf7-list-item {
  margin: 0;
  min-width: 0;
  max-width: 100%;
}

.apply-form__check,
.section--apply .c-form__row .wpcf7-checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.apply-form__check input,
.section--apply .c-form__row .wpcf7-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
}

.apply-form__textarea,
.section--apply .c-form__row textarea.wpcf7-form-control {
  min-height: 120px;
  resize: vertical;
}

.apply-form__acceptance {
  margin-top: 30px;
}

.apply-form__accept-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  line-height: 1.6;
  cursor: pointer;
}

.apply-form__accept-input {
  margin-top: 4px;
  flex-shrink: 0;
}

.apply-form__accept-text a {
  color: var(--color-primary);
  text-decoration: underline;
}

.apply-form__submit-wrap,
.section--apply .c-form__action {
  margin-top: 10px;
}

.apply-form__submit,
.section--apply .c-form__submit,
.section--apply .c-form__action .wpcf7-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 30px;
  padding: 28px 40px;
  border: none;
  border-radius: 9999px;
  background: #000;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.448;
  font-family: inherit;
  cursor: pointer;
  box-sizing: border-box;
}

/* CF7 デフォルトスピナー非表示（申込フォームのみ） */
.section--apply .wpcf7-spinner {
  display: none !important;
}

.section--apply .wpcf7 {
  display: block;
  max-width: 100%;
  min-width: 0;
}

.section--apply .wpcf7-form {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.section--apply .c-form__row .wpcf7-form-control-wrap {
  display: block;
  max-width: 100%;
  min-width: 0;
}

.section--apply .c-form__row .wpcf7-form-control-wrap:has(input[type="date"]),
.section--apply .c-form__row .wpcf7-form-control-wrap:has(input.wpcf7-date) {
  position: relative;
  overflow-x: hidden;
  width: 100%;
}

/*
 * type="date" の擬似プレースホルダー
 * JS が .wpcf7-form-control-wrap に .is-cf7-date-ph-visible と data-cf7-date-ph を付与。
 * ::before は子の input より下に描かれるため見えない → ::after で input の上に重ねる。
 */
.section--apply .c-form__row .wpcf7-form-control-wrap.is-cf7-date-ph-visible::after {
  content: attr(data-cf7-date-ph);
  position: absolute;
  left: 15px;
  right: 42px;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  box-sizing: border-box;
  padding: 0;
  overflow: hidden;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.2;
  color: #d0d0d0;
  white-space: nowrap;
  text-overflow: ellipsis;
  background-color: #fff;
  pointer-events: none;
}

.section--apply .c-form__row .wpcf7-form-control-wrap.is-cf7-date-ph-visible input[type="date"].wpcf7-form-control,
.section--apply .c-form__row .wpcf7-form-control-wrap.is-cf7-date-ph-visible input.wpcf7-date {
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* WebKit（iPhone Chrome 含む）: select の最小幅による横はみ出し・横揺れの抑止 */
.section--apply .c-form__row select.wpcf7-form-control {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* iOS / WebKit（iPhone Chrome 含む）: type="date" の横はみ出し・グレー塗りの緩和 */
.section--apply .c-form__row input[type="date"].wpcf7-form-control,
.section--apply .c-form__row input.wpcf7-date {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  min-height: calc(1.2em + 30px);
  background-color: #fff;
  color: #000;
  color-scheme: light;
  -webkit-text-fill-color: #000;
  -webkit-appearance: none;
  appearance: none;
}

.section--apply .c-form__row input[type="date"].wpcf7-form-control::-webkit-date-and-time-value {
  text-align: left;
}

.section--apply .c-form__row input[type="date"].wpcf7-form-control::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

.section--apply .c-form__row input[type="date"].wpcf7-form-control::-webkit-datetime-edit {
  padding: 0;
}

.section--apply .c-form .wpcf7-response-output {
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px solid #cdcdcd;
  font-size: 14px;
  line-height: 1.5;
}

/* CF7 プラグインの form.invalid 等の response-output（styles.css の border-color 等を上書き） */
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
  box-sizing: border-box;
  margin: 30px 0 0;
  padding: 15px;
  border: none;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  font-size: 14px;
  line-height: 1.5;
}

/* CF7 送信成功時の response-output（プラグインの緑枠を除去） */
.section--apply .wpcf7 form.sent .wpcf7-response-output {
  border: none;
}

.wpcf7-not-valid-tip {
  font-size: 12px;
  color: var(--color-primary);
  margin-top: 6px;
}

/* ----- news ----- */
.section__inner--news {
  padding-left: 20px;
  padding-right: 20px;
  background: #f5f5f5;
}

.news__text {
  margin: 30px 0;
  font-size: 15px;
  line-height: 2.2;
  color: #000;
  text-align: center;
}

/* ----- footer ----- */
.footer {
  background: #000;
  color: #fff;
}

.footer__inner {
  padding: 60px 20px 20px;
}

.footer__logo {
  display: block;
}

.footer__nav {
  margin-top: 30px;
  padding-bottom: 30px;
}

.footer__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #fff;
  font-size: 16px;
  line-height: 1.2;
  color: #fff;
}

.footer__link::after {
  content: "";
  width: 4px;
  height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='10' viewBox='0 0 4 10' fill='none'%3E%3Cpath d='M0.5 0.5L3.5 5L0.5 9.5' stroke='white'/%3E%3C/svg%3E")
    center / 4px 10px no-repeat;
  flex-shrink: 0;
}

.footer__address {
  margin: 0;
  padding: 0 0 60px;
  font-size: 13px;
  line-height: 1.6;
  color: #fff;
  text-align: left;
}

.footer__copy {
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  color: #717171;
}

/* 1100px だと中央 480px カラムと左右 320px レールが重なるため、重ならない幅から表示（方針 C） */
@media (min-width: 1240px) {
  .side-menu-wrap {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    width: 320px;
    height: 100%;
    padding: 40px;
    background: rgba(255, 255, 255, 0.96);
  }

  .side-menu-wrap__logo {
    display: block;
    flex-shrink: 0;
    margin-bottom: 60px;
  }

  .side-menu-wrap__logo-img {
    display: block;
    width: 140px;
    height: auto;
  }

  .side-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  .side-menu__link {
    position: relative;
    display: block;
    padding: 15px 40px 15px 15px;
    border-bottom: 1px solid #ececec;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.4;
    color: #000;
  }

  /* .flow-list__item:not(:last-child)::after と同じ三角（border）を右向きに回転 */
  .side-menu__link::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #b5b5b5;
    transform: translateY(-50%) rotate(0deg);
    pointer-events: none;
  }

  .side-menu__link:last-child {
    border-bottom: none;
  }

  .sub-contents {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 320px;
    height: 100%;
    padding: 40px;
    background: rgba(255, 255, 255, 0.96);
  }

  .sub-contents__label {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.35;
    color: #000;
    text-align: center;
  }

  .sub-contents__qr-wrap {
    width: 140px;
    height: 140px;
    padding: 6px;
    margin-bottom: 32px;
    border: 1px solid #c5c5c5;
    background: #fff;
  }

  .sub-contents__qr-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .sub-contents__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #000;
    text-align: center;
  }

  .sub-contents__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    border-radius: 9999px;
    border: 2px solid var(--color-primary);
    padding: 11px 30px 11px 16px;
    text-align: center;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-primary);
    background: #fff;
  }

  .sub-contents__cta::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 4px;
    height: 10px;
    transform: translateY(-50%);
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='10' viewBox='0 0 4 10' fill='none'%3E%3Cpath d='M0.5 0.5L3.5 5L0.5 9.5' stroke='black'/%3E%3C/svg%3E")
      center / 4px 10px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='10' viewBox='0 0 4 10' fill='none'%3E%3Cpath d='M0.5 0.5L3.5 5L0.5 9.5' stroke='black'/%3E%3C/svg%3E")
      center / 4px 10px no-repeat;
  }
}

/* ----- exam LP (/course/exam) ----- */
.exam-lp-body {
  scroll-padding-top: 0;
  scroll-padding-bottom: var(--exam-lp-footer-cta-height, 76px);
}

.exam-lp-body .site--exam-lp {
  --site-col-width: 480px;
  --exam-lp-footer-cta-height: 76px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding-top: 0;
  padding-bottom: var(--exam-lp-footer-cta-height);
  background: #fff;
  box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.1);
}

@media (min-width: 481px) {
  .exam-lp-body .site--exam-lp {
    width: var(--site-col-width);
    max-width: 100%;
  }
}

.exam-lp-body--no-footer-cta {
  scroll-padding-bottom: 0;
}

.exam-lp-body--no-footer-cta .site--exam-lp {
  padding-bottom: 0;
}

.exam-lp {
  margin: 0;
  padding: 0;
  line-height: 0;
}

/*
 * display:contents はフロントのみ。
 * WP 7 のエディタ canvas は iframe 内 body.block-editor-iframe__body に
 * page-exam.php の exam-lp-body も付くため、:not(.block-editor-page) では防げない。
 */
body.exam-lp-body:not(.block-editor-iframe__body) .exam-lp > .wp-block-mathlibaty-exam-lp,
body.exam-lp-body:not(.block-editor-iframe__body) .exam-lp > .wp-block-mathlibaty-habit-lp,
body.exam-lp-body:not(.block-editor-iframe__body) .exam-lp__sections,
body.exam-lp-body:not(.block-editor-iframe__body) .wp-block-mathlibaty-exam-lp-image,
body.exam-lp-body:not(.block-editor-iframe__body) .wp-block-mathlibaty-exam-lp-video,
body.exam-lp-body:not(.block-editor-iframe__body) .wp-block-mathlibaty-habit-lp-image,
body.exam-lp-body:not(.block-editor-iframe__body) .wp-block-mathlibaty-habit-lp-video {
  display: contents;
}

/* WP 7+ エディタ iframe: ブロックラッパーを維持（選択・スクロールに必須） */
.block-editor-iframe__body .exam-lp > .wp-block-mathlibaty-exam-lp,
.block-editor-iframe__body .exam-lp > .wp-block-mathlibaty-habit-lp,
.block-editor-iframe__body .wp-block-mathlibaty-exam-lp.mathlibaty-exam-lp-editor,
.block-editor-iframe__body .wp-block-mathlibaty-habit-lp.mathlibaty-habit-lp-editor,
.block-editor-iframe__body .wp-block-mathlibaty-exam-lp-image,
.block-editor-iframe__body .wp-block-mathlibaty-exam-lp-video,
.block-editor-iframe__body .wp-block-mathlibaty-habit-lp-image,
.block-editor-iframe__body .wp-block-mathlibaty-habit-lp-video {
  display: block !important;
}

.block-editor-iframe__body .exam-lp > .wp-block-mathlibaty-exam-lp,
.block-editor-iframe__body .exam-lp > .wp-block-mathlibaty-habit-lp,
.block-editor-iframe__body .wp-block-mathlibaty-exam-lp.mathlibaty-exam-lp-editor,
.block-editor-iframe__body .wp-block-mathlibaty-habit-lp.mathlibaty-habit-lp-editor {
  margin: 0;
  padding: 0;
  line-height: 0;
}

.block-editor-iframe__body .mathlibaty-exam-lp-editor .block-editor-inner-blocks > .block-editor-block-list__layout,
.block-editor-iframe__body .mathlibaty-habit-lp-editor .block-editor-inner-blocks > .block-editor-block-list__layout {
  margin: 0;
  line-height: normal;
}

/* ブロック間の「＋」挿入ボタン（line-height:0 で潰れないよう） */
.block-editor-iframe__body .mathlibaty-exam-lp-editor .block-list-appender,
.block-editor-iframe__body .mathlibaty-habit-lp-editor .block-list-appender,
.block-editor-iframe__body .mathlibaty-exam-lp-editor .block-editor-block-list__layout > .block-list-appender,
.block-editor-iframe__body .mathlibaty-habit-lp-editor .block-editor-block-list__layout > .block-list-appender {
  display: block !important;
  line-height: normal !important;
  min-height: 28px;
  margin: 6px auto !important;
  max-width: 480px;
  pointer-events: auto;
}

.block-editor-iframe__body .mathlibaty-exam-lp-editor .block-list-appender .block-editor-inserter__toggle,
.block-editor-iframe__body .mathlibaty-habit-lp-editor .block-list-appender .block-editor-inserter__toggle {
  visibility: visible !important;
  opacity: 1 !important;
}

.block-editor-iframe__body .mathlibaty-exam-lp-editor .block-editor-block-list__block,
.block-editor-iframe__body .mathlibaty-habit-lp-editor .block-editor-block-list__block {
  display: block !important;
  margin-top: 0 !important;
  margin-bottom: 12px !important;
  line-height: 0;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  scroll-margin-top: 80px;
  scroll-margin-bottom: 80px;
}

/* 親選択時・子選択時はブロック間の「＋」を表示（WP標準が opacity:0 になるため） */
.block-editor-iframe__body .wp-block-mathlibaty-exam-lp.is-selected .block-list-appender .block-list-appender__toggle,
.block-editor-iframe__body .wp-block-mathlibaty-exam-lp.has-child-selected .block-list-appender .block-list-appender__toggle,
.block-editor-iframe__body .wp-block-mathlibaty-habit-lp.is-selected .block-list-appender .block-list-appender__toggle,
.block-editor-iframe__body .wp-block-mathlibaty-habit-lp.has-child-selected .block-list-appender .block-list-appender__toggle {
  opacity: 1 !important;
  transform: none !important;
}

.block-editor-iframe__body .mathlibaty-exam-lp-editor .block-editor-block-list__block .exam-lp__block,
.block-editor-iframe__body .mathlibaty-habit-lp-editor .block-editor-block-list__block .exam-lp__block {
  pointer-events: auto;
}

.block-editor-iframe__body .mathlibaty-exam-lp-editor .block-editor-block-list__block.is-selected .exam-lp__block,
.block-editor-iframe__body .mathlibaty-exam-lp-editor .block-editor-block-list__block.has-child-selected .exam-lp__block,
.block-editor-iframe__body .mathlibaty-exam-lp-editor .block-editor-block-list__block.is-highlighted .exam-lp__block,
.block-editor-iframe__body .mathlibaty-habit-lp-editor .block-editor-block-list__block.is-selected .exam-lp__block,
.block-editor-iframe__body .mathlibaty-habit-lp-editor .block-editor-block-list__block.has-child-selected .exam-lp__block,
.block-editor-iframe__body .mathlibaty-habit-lp-editor .block-editor-block-list__block.is-highlighted .exam-lp__block {
  outline: 2px solid var(--wp-admin-theme-color, #3858e9);
  outline-offset: 0;
}

/* 旧来の非 iframe エディタ向けフォールバック */
.block-editor-page:not(:has(iframe[name="editor-canvas"])) .mathlibaty-exam-lp-editor .block-editor-block-list__block,
.block-editor-page:not(:has(iframe[name="editor-canvas"])) .mathlibaty-habit-lp-editor .block-editor-block-list__block {
  display: block !important;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  scroll-margin-top: 80px;
  scroll-margin-bottom: 80px;
}

.mathlibaty-exam-lp-editor.exam-lp,
.mathlibaty-habit-lp-editor.exam-lp {
  margin: 0;
  padding: 0;
  line-height: 0;
}

.exam-lp__video--editor-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  font-size: 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
}

.exam-lp__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #757575;
  background: #f6f7f7;
  box-sizing: border-box;
}

.mathlibaty-exam-lp-inspector-thumb {
  margin-bottom: 16px;
}

.mathlibaty-exam-lp-inspector-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #dcdcde;
  border-radius: 2px;
  background: #f6f7f7;
}

.mathlibaty-exam-lp-inspector-thumb__caption {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: #757575;
  word-break: break-all;
}

.editor-styles-wrapper .wp-block-mathlibaty-exam-lp-image,
.editor-styles-wrapper .wp-block-mathlibaty-exam-lp-video,
.editor-styles-wrapper .wp-block-mathlibaty-habit-lp-image,
.editor-styles-wrapper .wp-block-mathlibaty-habit-lp-video {
  scroll-margin-top: 80px;
  scroll-margin-bottom: 80px;
}

/* LP 内の WordPress 標準ブロック（段落・見出しなど） */
.exam-lp__sections > [class*="wp-block-"]:not(.wp-block-mathlibaty-exam-lp-image):not(.wp-block-mathlibaty-exam-lp-video):not(.wp-block-mathlibaty-habit-lp-image):not(.wp-block-mathlibaty-habit-lp-video),
.exam-lp__sections > .wp-block {
  display: block;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  font-size: 16px;
  color: #333;
}

.exam-lp__sections > [class*="wp-block-"] .wp-block-image img,
.exam-lp__sections > .wp-block .wp-block-image img {
  width: 100%;
  height: auto;
}

.block-editor-iframe__body .exam-lp__sections > [class*="wp-block-"]:not(.wp-block-mathlibaty-exam-lp-image):not(.wp-block-mathlibaty-exam-lp-video):not(.wp-block-mathlibaty-habit-lp-image):not(.wp-block-mathlibaty-habit-lp-video),
.block-editor-iframe__body .mathlibaty-exam-lp-editor .block-editor-block-list__block:not(.wp-block-mathlibaty-exam-lp-image):not(.wp-block-mathlibaty-exam-lp-video),
.block-editor-iframe__body .mathlibaty-habit-lp-editor .block-editor-block-list__block:not(.wp-block-mathlibaty-habit-lp-image):not(.wp-block-mathlibaty-habit-lp-video) {
  display: block !important;
  line-height: 1.6;
}

.exam-lp__block {
  margin: 0;
  padding: 0;
}

.exam-lp__img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.exam-lp__cta-link {
  display: block;
  line-height: 0;
  text-decoration: none;
}

.exam-lp__cta-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* LP_32 上に重ねる YouTube（位置・サイズは CSS 変数で調整） */
.exam-lp__block--video .exam-lp__video-wrap {
  position: relative;
  display: block;
  --exam-lp-video-width: 85%;
  --exam-lp-video-top: 27%;
  --exam-lp-video-left: 50%;
}

.exam-lp__block--video .exam-lp__video {
  position: absolute;
  top: var(--exam-lp-video-top);
  left: var(--exam-lp-video-left);
  z-index: 1;
  width: var(--exam-lp-video-width);
  aspect-ratio: 16 / 9;
  transform: translateX(-50%);
  overflow: hidden;
  line-height: 0;
}

.exam-lp__block--video .exam-lp__video iframe {
  display: block;
  width: 100%;
  height: 75%;
  border: 0;
}

/* 受験対策 LP 固定フッター CTA（Figma: 364-44） */
.exam-lp-footer-cta {
  position: fixed;
  bottom: 0;
  left: max(0px, calc((100vw - min(var(--site-col-width), 100vw)) / 2));
  z-index: 100;
  width: min(var(--site-col-width), 100vw);
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: #fff;
  box-sizing: border-box;
}

.exam-lp-footer-cta__inner {
  display: flex;
  width: 100%;
}

.exam-lp-footer-cta__btn {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: var(--exam-lp-footer-cta-height);
  padding: 10px;
  box-sizing: border-box;
  color: #fff;
  text-decoration: none;
}

.exam-lp-footer-cta__btn--line {
  background: #00b902;
}

.exam-lp-footer-cta__btn--form {
  background: #004cac;
}

.exam-lp-footer-cta__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: auto;
  color: #fff;
}

.exam-lp-footer-cta__icon img {
  display: block;
  width: 40px;
  height: auto;
}

.exam-lp-footer-cta__label {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  color: #fff;
  margin-top: 2px;
}
