/* ===== サブページ共通 ===== */

/* ロゴリンク */
.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

/* 現在ページのナビリンク */
nav ul li a.current {
  border-bottom: 1px solid #1a1a1a;
}

/* ページヒーロー */
.page-hero {
  margin-top: 82px;
  background: #e4ddf0;
  padding: 56px 24px;
}

.page-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.page-title-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.page-crest {
  height: 68px;
  width: auto;
  opacity: 0.75;
}

.page-label {
  font-size: 11px;
  letter-spacing: 0.4em;
  color: #9b8fad;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.page-title {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: normal;
  letter-spacing: 0.15em;
  color: #1a1a1a;
}

/* 教室案内ページ：紫帯内タイトルを80%に縮小 */
.page-hero-class .page-title {
  font-size: 32px;
}

/* リードテキスト */
.lead-text {
  font-size: 18px;
  line-height: 2.2;
  color: #444;
  text-align: center;
}

/* モバイル見出しブロック（PC では非表示） */
.history-heading {
  display: none;
}

/* 書籍購入ボタン：PC ではモバイル版を非表示 */
.book-buy-sp {
  display: none;
}

/* 尾上幸蔵・二代目藤間ポートレート：PC では左寄せ */
.history-block + .history-block.alt .history-photo img,
.history-block.alt + .history-block.alt .history-photo img {
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* ===== プロフィールページ ===== */
.profile-detail { background: #fff; }

.profile-affiliation {
  font-size: 18px !important;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding-top: 12px;
  padding-bottom: 12px;
}

.profile-detail .info-table th,
.profile-detail .info-table td { font-size: 17px !important; }

/* プロフィールページ：本文エリアの左右余白を+15px */
.profile-detail .section-inner {
  padding-left: 39px;
  padding-right: 39px;
}

/* プロフィールページ：紫帯（名前＋プロフィール表記のみのシンプル仕様） */
.page-hero-profile {
  padding: 32px 0;
}

.page-hero-profile .page-hero-inner {
  max-width: 700px;
  padding-left: 39px;
  padding-right: 39px;
  margin: 0 auto;
}

.page-hero-title-profile {
  font-size: 24px;
  line-height: 1.8;
  letter-spacing: 0.15em;
  text-align: left;
  color: #1a1a1a;
  font-weight: normal;
}

/* プロフィールページ：年表下のギャラリー（横位置写真を縦並び） */
.profile-gallery {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gallery-caption {
  font-size: 14px;
  letter-spacing: 0.05em;
  color: #333;
  text-align: left;
  margin-bottom: 8px;
}

.profile-gallery .gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}

/* ===== 歴史ページ ===== */
.history-intro { background: #fff; }
.history-intro .lead-text {
  font-size: 18px;
}

.history-block { background: #fff; padding: 0; }
.history-block.alt { background: #f9f9f9; }

.history-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 56px 0;
}

.history-item.reverse {
  direction: rtl;
}
.history-item.reverse > * {
  direction: ltr;
}

.history-era {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: #888;
  margin-bottom: 12px;
}

.history-text h2 {
  font-size: 22px;
  font-weight: normal;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.history-text p {
  font-size: 15px;
  color: #444;
  line-height: 2;
}

/* 4枚横並びギャラリー */
.history-gallery.history-gallery-4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.history-gallery.history-gallery-4 img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  object-position: top;
}

/* ギャラリー */
.photo-gallery { background: #f9f9f9; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

/* 歴史ページ内ギャラリー */
.history-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.history-gallery img {
  width: 100%;
  height: auto;
  display: block;
}

/* 家系図セクション */
.lineage-section {
  background: #f9f9f9;
  padding: 56px 24px;
}

.lineage-inner {
  max-width: 900px;
  margin: 0 auto;
}

.lineage-img-wrap {
  text-align: center;
}

.lineage-img {
  width: 74.3%;
  height: auto;
  display: block;
  margin: 0 auto;
  mix-blend-mode: multiply;
}

/* タイムライン縦線（JSで生成・写真底辺中央からスタート） */
.history-timeline {
  position: relative;
}

.history-timeline-line {
  position: absolute;
  width: 1px;
  background: #1a1a1a;
  pointer-events: none;
  z-index: 0;
}

/* 各人物ポートレートを20%縮小・中央寄せ */
.history-photo img {
  width: 80% !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto !important;
}

/* 四代目尾上紋三郎・グレープレースホルダーを64%サイズに揃える */
.history-photo-sm img {
  width: 64% !important;
}
.history-photo-sm .placeholder-img {
  width: 64%;
  margin: 0 auto;
}

/* コンテンツが線の前面に来るよう配置 */
.history-item {
  position: relative;
}

.history-gallery {
  position: relative;
}

/* テキストエリアに背景を設定して線が文字に掛からないよう隠す */
.history-text {
  background: #fff;
  padding-left: 4px;
  padding-right: 4px;
}
.history-block.alt .history-text {
  background: #f9f9f9;
}

/* ===== CSS家系図（org chart style） ===== */
.ftree-wrap {
  overflow-x: auto;
  padding: 16px 0 32px;
  -webkit-overflow-scrolling: touch;
}

.ftree,
.ftree ul {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.ftree {
  display: table;
  margin: 0 auto;
  text-align: center;
  font-size: 12px;
  min-width: 800px;
}

.ftree ul {
  display: table;
  width: 100%;
}

.ftree li {
  display: table-cell;
  padding: 0.5em 0;
  vertical-align: top;
}

/* 横線（子を繋ぐ水平バー） */
.ftree li::before {
  content: '';
  outline: solid 1px #b0a3c8;
  display: block;
  height: 24px;
}

.ftree li:first-child::before {
  outline: solid 1px #b0a3c8;
  margin-left: 50%;
  border-radius: 0;
}

.ftree li:last-child::before {
  outline: solid 1px #b0a3c8;
  margin-right: 50%;
}

.ftree li:only-child::before {
  outline: none;
  border-left: 1px solid #b0a3c8;
  margin: 0 auto;
  width: 0;
}

/* 縦線（親から子への接続） */
.ftree li > div::before {
  content: '';
  display: block;
  border-left: 1px solid #b0a3c8;
  height: 20px;
  margin: 0 auto;
  width: 0;
}

.ftree li:only-child > div::before {
  /* 単一子 - 縦線のみ */
}

/* 人物ボックス */
.ftree-box {
  border: 1px solid #b0a3c8;
  padding: 8px 12px;
  background: #fff;
  display: inline-block;
  text-align: left;
  min-width: 130px;
  max-width: 180px;
  margin: 0 6px;
}

.ftree-box.ftree-current {
  background: #e4ddf0;
  border-color: #9b8fad;
}

.ftree-box.ftree-ancestor {
  background: #fafafa;
}

.ftree-box .ftree-name {
  display: block;
  font-family: "Shippori Mincho", "游明朝", YuMincho, serif;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: #1a1a1a;
  line-height: 1.6;
}

.ftree-box .ftree-year {
  display: block;
  font-size: 10px;
  color: #888;
  margin-top: 3px;
  letter-spacing: 0.03em;
}

.ftree-box .ftree-spouse {
  display: block;
  font-size: 10px;
  color: #6b5f88;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed #c8bedd;
  letter-spacing: 0.03em;
}

.ftree-box .ftree-note {
  display: block;
  font-size: 10px;
  color: #888;
  margin-top: 2px;
  font-style: italic;
}

/* ===== 教室案内ページ ===== */
.class-intro { background: #fff; }
.class-intro .section-inner { padding-top: 50px; padding-bottom: 0; }
.class-photos { background: #fff; padding-top: 0; }
.class-detail { background: #fff; }
.class-items.alt { background: #f3f3f3; }
.class-trial { background: #f3f3f3; }

/* 教室案内ページ：各見出しを紫文字に（PC・スマホ共通） */
.class-items.alt .section-title,
.class-detail .section-title,
.class-trial .section-title {
  color: #5a4f72;
}

/* こんな方へ：見出しを下の項目の左端に揃える（PCのみ） */
.class-items.alt .section-inner.narrow {
  display: grid;
  justify-content: center;
}
.class-items.alt .section-title {
  text-align: left;
  margin-bottom: 4px;
}
.class-items.alt ul li {
  font-size: 20px !important;
}

/* こんな方へ：背景帯の天地余白を縮小（PCのみ） */
.class-items.alt .section-inner {
  padding-top: 40px;
  padding-bottom: 40px;
}

/* 稽古写真：こんな方への背景帯に近づけて間隔を詰める（PCのみ） */
.class-photos:not(.class-photos-sp) .section-inner {
  padding-top: 40px;
  padding-bottom: 16px;
}

/* 追加の稽古写真（keiko）：稽古1・2の下に中央表示 */
.class-photos.class-photos-keiko:not(.class-photos-sp) .section-inner {
  padding-top: 0;
  padding-bottom: 60px;
}
.photo-keiko {
  display: flex;
  justify-content: center;
}
.photo-keiko .keiko-img {
  width: 60%;
  height: auto;
  display: block;
}

/* お問い合わせCTAセクション：上に詰める（PCのみ） */
.class-trial-cta {
  margin-top: -50px;
}
/* スマホ表示用 稽古写真（説明文の下に①②）：PCでは非表示 */
.class-photos-sp { display: none; }

/* 稽古時間：PCでは1行に表示（改行はスマホのみ） */
.sp-only-break { display: none; }

.photo-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.photo-three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.photo-three-col .placeholder-img,
.photo-three-col img {
  width: 72%;
  margin: 0 auto;
}

.photo-two-kiko {
  display: flex;
  gap: 16px;
  justify-content: center;
}
.photo-two-kiko .kiko-img {
  width: 52.42%;
  height: auto;
  object-fit: cover;
}

/* テーブル */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 32px;
  font-size: 14px;
}

.info-table th,
.info-table td {
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
}

.info-table th {
  width: 160px;
  color: #888;
  font-weight: normal;
  white-space: nowrap;
}

/* 入門体験について：（12歳以下）の文字サイズ */
.fz-age12 {
  font-size: calc(1em - 3px);
}

/* CTAブロック */
.cta-block {
  text-align: center;
  margin-top: 46px;
  padding: 46px;
  background: #fff;
}

.cta-block p {
  font-size: 21px;
  color: #555;
  margin-bottom: 23px;
}

.btn-primary {
  display: inline-block;
  background: #e4ddf0;
  color: #5a4f72;
  padding: 16px 55px;
  font-size: 16px;
  letter-spacing: 0.1em;
  transition: background 0.2s;
}

.btn-primary:hover { background: #b0a3c8; }

/* ===== 書籍紹介（サブページ） ===== */
.book-cta {
  background: #f9f9f9;
}

/* PCで画像とテキストの左右を入れ替え */
.book-cta .image-block { order: 2; }
.book-cta .text-block { order: 1; }

.book-cta .book-desc { font-size: 17px; }

/* book ラベルの右に横線 */
.book-cta .section-label {
  display: flex;
  align-items: center;
  gap: 12px;
}
.book-cta .section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #c8bedd;
}

/* ページナビ */
.page-nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
  border-top: 1px solid #e0e0e0;
}

.back-link {
  font-size: 13px;
  color: #666;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.back-link:hover { color: #1a1a1a; }

/* ===== レスポンシブ（モバイル）===== */
@media (max-width: 768px) {

  /* ページヒーロー */
  .page-hero {
    margin-top: 60px;
    padding: 16px 16px 32px;
  }
  .page-crest {
    height: 48px;
  }
  .page-title {
    font-size: 24px;
  }
  .page-hero-class .page-title {
    font-size: 24px;
  }
  .page-label {
    margin-bottom: 10px;
    text-align: center;
  }
  /* 教室案内ページ：タイトルを紫帯の天地センターに */
  .page-hero-class {
    padding-top: 24px;
    padding-bottom: 24px;
  }
  /* 教室案内ページ：タイトルを紫帯の左右センターに */
  .page-hero-class .page-title-row {
    transform: none;
  }
  .page-title-row {
    justify-content: center;
    gap: 10px;
    transform: translateX(-12px);
  }

  /* プロフィールページ：紫帯の天地余白を調整 */
  .page-hero-profile {
    padding: 24px 0;
  }
  .page-hero-profile .page-hero-inner {
    padding-left: 35px;
    padding-right: 35px;
  }
  /* プロフィールページ：年表の文字サイズ */
  .profile-detail .info-table th,
  .profile-detail .info-table td {
    font-size: 14px;
  }
  .profile-affiliation { font-size: 16px !important; }
  .profile-detail .info-table th,
  .profile-detail .info-table td { font-size: 12px !important; }
  /* プロフィールページ：本文エリアの左右余白を+15px */
  .profile-detail .section-inner {
    padding-left: 35px;
    padding-right: 35px;
  }

  /* リードテキスト */
  .lead-text {
    font-size: 17px;
    line-height: 2;
    text-align: left;
  }
  /* 改行タグを無効化し自然な折り返しで行数を減らす */
  .lead-text br {
    display: none;
  }
  /* 左右の余白を広げる */
  .history-intro .section-inner,
  .class-intro .section-inner {
    padding-left: 36px;
    padding-right: 36px;
  }
  /* 教室案内ページ：説明文の下の余白を詰める（写真を近づける） */
  .class-intro .section-inner {
    padding-bottom: 12px;
  }
  /* 教室案内ページ：最終行の孤立（「す。」のみ）を避けるための微調整 */
  .class-intro .lead-text {
    letter-spacing: -0.01em;
  }
  /* 教室案内ページ：「そして」の前で改行 */
  .class-intro .lead-text .sp-break-so {
    display: block;
  }
  /* 稽古写真：説明文との間の余白を詰める */
  .class-photos-sp .section-inner {
    padding-top: 12px;
  }
  /* こんな方へ：見出しをセンターに、上の余白を詰める、背景濃度+2% */
  .class-items.alt .section-title {
    text-align: center;
  }
  /* こんな方へ：PC用グリッドレイアウトを解除 */
  .class-items.alt .section-inner.narrow {
    display: block;
  }
  .class-items.alt .section-inner {
    padding-top: 24px;
    padding-bottom: 48px;
  }
  .class-items.alt ul {
    margin-top: 16px !important;
  }
  .class-items.alt li {
    font-size: 16px !important;
  }
  .class-items.alt {
    background: #f4f4f4;
  }
  /* お稽古について：見出しをセンターに、左右の余白を広げる */
  .class-detail-training .section-title {
    text-align: center;
  }
  .class-detail-training .section-inner {
    padding-left: 36px;
    padding-right: 36px;
  }
  .class-detail-training .section-inner > p {
    font-size: 17px !important;
  }
  .class-detail-training .info-table th,
  .class-detail-training .info-table td {
    font-size: 18px;
  }
  /* 稽古時間：スマホでは改行を表示 */
  .sp-only-break {
    display: inline;
  }
  /* 入門料・月謝：お稽古についてと同じレイアウト・文字サイズに合わせる */
  .class-detail-pricing {
    background: #f4f4f4 !important;
  }
  .class-detail-pricing .section-title {
    text-align: center;
  }
  .class-detail-pricing .section-inner {
    padding-left: 36px;
    padding-right: 36px;
  }
  .class-detail-pricing .info-table th,
  .class-detail-pricing .info-table td {
    font-size: 18px;
  }
  /* 持ち物・服装：見出しをセンターに */
  .class-detail-belongings .section-title {
    text-align: center;
  }
  /* 持ち物・服装：本文の文字サイズ・配置をPC調整前の値に固定 */
  .class-detail-belongings .section-inner p {
    font-size: 16px !important;
    text-align: center !important;
  }
  /* 入門体験について：体験料の文字サイズを入門料・月謝に合わせる、背景もこんな方へに合わせる */
  .class-trial {
    background: #f4f4f4;
  }
  .class-trial .info-table th,
  .class-trial .info-table td {
    font-size: 18px;
  }
  /* 入門体験について：見出しをセンターに */
  .class-trial .section-title {
    text-align: center;
  }
  /* 入門体験について：説明文の文字サイズ・配置・改行をPC調整前の値に固定 */
  .class-trial .section-inner > p:first-of-type {
    font-size: 16px !important;
    text-align: center !important;
  }
  /* 入門体験について：見学のみの受付に関する注記をセンターに固定 */
  .class-trial .section-inner > p:last-of-type {
    text-align: center !important;
  }
  /* CTAブロック：案内文の文字サイズをPC調整前の値に固定 */
  .cta-block p {
    font-size: 20px !important;
  }
  /* お問い合わせCTAセクション：上に詰める調整はPCのみ */
  .class-trial-cta {
    margin-top: 0;
  }
  /* CTAブロック（案内文＋ボタン）をスマホで上へ移動し、下の余白も詰める（入門体験セクションには被らない位置） */
  .cta-block {
    margin-top: -34px;
  }
  /* 入門体験について：（12歳以下）の文字サイズをスマホでさらに1px縮小 */
  .fz-age12 {
    font-size: calc(1em - 4px);
  }
  /* お問い合わせフォームへボタン：1行に収める（文字縮小） */
  .btn-primary {
    font-size: 16px;
    padding: 16px 28px;
    white-space: nowrap;
  }
  .lineage-section {
    padding: 40px 16px 4px !important;
  }
  .history-block:first-of-type .section-inner {
    padding-top: 12px !important;
    padding-bottom: 0 !important;
  }
  .history-timeline section + section .section-inner {
    padding-top: 0 !important;
  }
  .history-block + .history-block.alt .history-heading,
  .history-block + .history-block.alt .history-item {
    margin-top: -24px;
  }
  /* 初代セクション：history-text の margin-top をリセット */
  .history-block.alt + .history-block + .history-block.alt .history-text {
    margin-top: -60px !important;
    align-self: auto !important;
  }
  /* 初代・二代目セクション：ギャラリー画像を縮小 */
  .history-block.alt + .history-block + .history-block.alt .history-gallery .placeholder-img,
  .history-block.alt + .history-block.alt .history-gallery .placeholder-img {
    width: 75%;
    margin: 0 auto;
  }
  .history-block + .history-block.alt .history-photo img,
  .history-block.alt + .history-block.alt .history-photo img {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .history-block + .history-block.alt .history-gallery {
    margin-top: -24px !important;
  }
  .history-block.alt + .history-block .history-gallery {
    margin-top: -24px !important;
  }
  .history-timeline section + section {
    margin-top: -16px;
  }

  /* 説明文のbrタグをモバイルでは非表示（自然な折り返しに） */
  .history-text p br {
    display: none;
  }

  /* 説明文の文字サイズ */
  .history-text p {
    font-size: 17px;
  }

  /* 見出しブロック：写真の上に表示 */
  .history-heading {
    display: block;
    grid-column: 1 / -1;
    margin-bottom: 4px;
  }
  .history-heading .history-era {
    font-size: 13px;
    letter-spacing: 0.3em;
    color: #888;
    margin-bottom: 8px;
  }
  .history-heading h2 {
    font-size: 20px;
    font-weight: normal;
    letter-spacing: 0.1em;
    margin-bottom: 0;
  }
  /* history-text 内の era と h2 を非表示 */
  .history-text .history-era,
  .history-text h2 {
    display: none;
  }

  /* 歴史アイテム：1カラムに */
  .history-item {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    padding: 40px 0 !important;
  }
  .history-item.reverse {
    direction: ltr;
  }

  /* ポートレート */
  .history-photo img {
    width: 60% !important;
    margin: 0 auto !important;
  }
  /* 大橋屋.jpg を120%拡大（60% × 1.2 = 72%） */
  .ohashiya-photo img {
    width: 72% !important;
  }
  .history-photo-sm img {
    width: 50% !important;
    margin: 0 auto !important;
  }
  .history-photo-sm .placeholder-img {
    width: 50%;
  }

  /* 初代・藤間佳寿：モバイルでも重なり配置を維持 */
  .history-item > div[style*="position:relative"] {
    position: relative !important;
    min-height: 300px !important;
    display: block !important;
    flex-direction: unset !important;
    gap: unset !important;
    justify-content: unset !important;
    margin-bottom: 16px;
  }
  /* 初代（左・前面） */
  .history-item > div[style*="position:relative"] > div:first-child {
    position: absolute !important;
    width: 41% !important;
    left: 9% !important;
    top: 0 !important;
    right: auto !important;
    z-index: 1;
  }
  /* 藤間佳寿（右・下にオフセット） */
  .history-item > div[style*="position:relative"] > div:last-child {
    position: absolute !important;
    width: 41% !important;
    left: 50% !important;
    right: auto !important;
    top: 30px !important;
  }

  /* 高さスペーサーを縮小 */
  .history-text div[style*="height"] {
    height: 0 !important;
  }

  /* ギャラリー */
  .history-gallery {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 20px !important;
  }
  .history-gallery img[style*="grid-column:1/-1"] {
    width: 100% !important;
  }

  /* 3枚写真ギャラリーのネガティブマージンを解除 */
  .history-gallery[style*="margin-top:-"] {
    margin-top: 24px !important;
  }

  /* 家系図 */
  .lineage-img {
    width: 100% !important;
  }
  .lineage-img-wrap {
    padding-left: 0 !important;
    text-align: left !important;
  }
  .lineage-img {
    margin-left: 0% !important;
    margin-top: -20px !important;
  }
  .lineage-section {
    padding-bottom: 20px !important;
  }
  .lineage-section {
    padding: 40px 16px;
  }

  /* 尾上幸蔵以降を下げる */
  #section-kozo {
    margin-top: -20px !important;
  }

  /* 初代・二代目セクションのPC用負マージンをリセット */
  #section-shodai {
    margin-top: 0 !important;
    background: #fff !important;
  }

  /* 初代藤間紋三郎以降を下げる＋グレー上辺を上げる */
  #section-shodaiko {
    margin-top: 4px !important;
    background: linear-gradient(to bottom, #fff 8px, #f9f9f9 8px) !important;
  }

  /* 初代ポートレートのPC用transformをリセット */
  #section-shodaiko .history-item > div[style*="position:relative"] {
    transform: none !important;
  }

  /* book テキストのPC用margin-leftをリセット */
  .book-cta .text-block {
    margin-left: 0 !important;
  }

  /* PC調整用マージンをリセット */
  .history-item[style*="margin-right:-70px"] {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* タイムライン縦線を非表示 */
  .history-timeline-line {
    display: none !important;
  }

  /* テキスト背景（モバイルでは不要） */
  .history-text {
    background: transparent !important;
    padding-left: 16px;
    padding-right: 16px;
  }
  .history-block.alt .history-text {
    background: transparent !important;
  }

  /* セクション内パディング調整 */
  .history-block .section-inner,
  .history-block.alt .section-inner {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }

  /* キャプション */
  .history-photo p[style] {
    text-align: center !important;
    padding-left: 0 !important;
  }

  /* 教室案内 */
  .photo-two-col {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .photo-three-col {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  /* 稽古写真：説明文の下に①②を表示し、元の③枚セクションは非表示 */
  .class-photos:not(.class-photos-sp) {
    display: none;
  }
  .class-photos-sp {
    display: block;
  }
  /* 追加の稽古写真（keiko）：スマホでも表示 */
  .class-photos.class-photos-keiko {
    display: block;
  }
  .class-photos.class-photos-keiko .section-inner {
    padding-top: 0;
    padding-bottom: 2px;
  }
  .photo-keiko .keiko-img {
    width: 60%;
  }
  /* 稽古写真：①②とも130%拡大、横並びを基本に②を①の下へ少し重ねて下にずらす */
  .class-photos-sp .photo-three-col {
    display: block;
    position: relative;
    width: 100%;
    height: 37.4vw;
    margin: 0;
  }
  .class-photos-sp .photo-three-col img:nth-child(1) {
    width: 53%;
    height: auto;
    margin: 0;
    position: relative;
    z-index: 2;
  }
  .class-photos-sp .photo-three-col img:nth-child(2) {
    width: 53%;
    height: auto;
    margin: 0;
    position: absolute;
    top: 7.6vw;
    left: 47%;
    z-index: 1;
  }
  .class-photos-sp .section-inner {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
  }
  .class-photos-sp + .class-items.alt .section-inner {
    padding-top: 20px;
  }
  .info-table th {
    width: 100px;
    font-size: 13px;
  }
  .info-table td {
    font-size: 13px;
  }
  .info-table th,
  .info-table td {
    padding: 12px 12px;
  }

  /* 書籍タイトルを右に寄せる（index.html用） */
  .book-title {
    padding-left: 36px;
  }
  /* 書籍見出し・タイトルを縮小 */
  .book-cta .section-title {
    font-size: 17px;
  }
  .book-cta .book-title {
    font-size: 26px;
  }

  /* 説明文をセンター揃え・左右対称の余白に調整 */
  .book-cta .book-desc {
    text-align: center;
    padding-left: 16px;
    padding-right: 16px;
  }
  /* 改行タグを無効化し自然な折り返しで行数を減らす */
  .book-cta .book-desc br {
    display: none;
  }
  /* 見出し・タイトルを中央揃えに（右寄せ用paddingを解除） */
  .book-cta .section-title,
  .book-cta .book-title {
    padding-left: 0;
  }

  /* 書籍セクション：テキストを上・画像を下に */
  .book .text-block { order: 1; }
  .book .image-block { order: 2; }
  /* 購入ボタン切り替え */
  .book-buy-pc { display: none; }
  .book-buy-sp { display: block; }

  /* 書籍写真 */
  .book-cover {
    width: 70% !important;
    margin: 0 auto;
  }

  /* ページナビ */
  .page-nav {
    padding: 32px 20px;
  }
  .back-link {
    font-size: 15px;
  }

  /* 書籍セクション：背景濃度を少し上げる */
  .book-cta {
    background: #f4f4f4;
  }

  .book-cover-img {
    width: 80% !important;
    margin-left: auto;
    margin-right: auto;
  }
}
