﻿@charset "utf-8";

/* ==============================================
   1. VARIABLES & THEMES
============================================== */
:root {
  --hirak2: "ヒラギノ角ゴ W2 JIS2004", "Hiragino Kaku Gothic W2 JIS2004", Sans-Serif;
  --hirak5: "ヒラギノ角ゴ W5 JIS2004", "Hiragino Kaku Gothic W5 JIS2004", Sans-Serif;
  --hiram6: "ヒラギノ明朝 W6 JIS2004", "Hiragino Mincho W6 JIS2004", serif;
  --hirak: "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, "sans-serif";
  --FA6: "Font Awesome 6 Free";

  --blue: #043491;
  --red: #FF0000;
  --white: #FFF;
  --black: #333;
  --link: #003B83;

  /* デフォルト：紺色テーマ */
  --bg-color: #f2f5f9;
  --z-blue: #043491;
  --z-blue-light: #5170FF;
  --z-blue-bg: #F4F7FF;
  --z-red: #FF5D5C;
  --z-red-bg: #FFF4F4;
  --border-gray: #cbd5e1;
}

/* ★オレンジテーマ上書き設定 (body.theme-orange 付与時) */
body.theme-orange {
  --bg-color: #FAF7F2;          /* 全体背景：ウォームグレー */
  --z-blue: #F39800;            /* H2用：ビビッドオレンジ */
  --z-blue-light: #C66800;      /* H3・テキスト用：深めオレンジ */
  --z-blue-bg: #FFF8EE;         /* サブ背景：ごく薄いクリーム */
  --border-gray: #FFE7C7;       /* 枠線用：ペールオレンジ */
  --link: #C66800;
}

/* ==============================================
   2. COMMON LAYOUT & RESET
============================================== */
*, *:before, *:after { 
  box-sizing: border-box; 
}

*:focus { 
  outline: none; 
}

html { 
  overflow-y: scroll; 
  -webkit-text-size-adjust: 100%; 
  scroll-behavior: smooth; 
  scroll-padding-top: 50px; 
}

body {
  font-family: var(--hirak2);
  font-size: 15px;
  line-height: 1.6;
  color: var(--black);
  background-color: var(--bg-color);
  margin: 0;
}

img { 
  max-width: 100% !important; 
  height: auto !important; 
  display: block; 
  margin: 0 auto; 
}

.container { 
  display: flex; 
  flex-direction: column; 
  min-height: 100vh; 
  position: relative; 
}

main {
  width: 94%;
  max-width: 980px;
  margin: 0 auto;
  padding-bottom: 120px;
}

/* ==============================================
   3. HEADER
============================================== */
header.header-area {
  background: var(--white);
  border-bottom: 3px solid var(--z-blue);
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  margin-bottom: 25px;
  margin-top: 44px; /* スマホ固定ナビの高さ分 */
}

header.header-area img,
.header-logo { 
  width: 125px; 
  height: auto; 
  display: block;
}

@media screen and (max-width:520px) {
  header.header-area { 
    flex-direction: column; 
    height: auto; 
    padding: 10px 0; 
  }
  header.header-area img, .header-logo { 
    width: 110px; 
  }
}

/* ==============================================
   4. PAGE TITLE & NOTICE BOX
============================================== */
.main-title {
  color: var(--z-blue);
  /* 画面幅に合わせて 1.15em ～ 1.6em の間で自動調整 */
  font-size: clamp(1.15em, 4.5vw, 1.6em);
  font-weight: bold;
  font-family: var(--hiram6);
  text-align: center;
  margin: 10px 0 20px;
  line-height: 1.5;
}

/* 文節の途中で改行させないためのクラス */
.ib {
  display: inline-block;
}

/* サブタイトルのスタイル（インラインCSSを整理） */
.main-title .sub-title {
  font-size: 0.7em;
  font-weight: normal;
  color: #475569;
  display: block;
  margin-top: 8px;
}

/* スマホ幅（767px以下）ではPC用の強制改行を無効化 */
@media (max-width: 767px) {
  .pc-only {
    display: none;
  }
}

.notice-box {
  background: #f8fafc;
  border: 1px solid var(--border-gray);
  border-left: 5px solid var(--z-blue);
  border-radius: 6px;
  padding: 16px 20px;
  font-size: 0.9em;
  color: #475569;
  margin-bottom: 30px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

body.theme-orange .notice-box {
  background: #fffdf9;
}

.notice-box p {
  margin: 0 0 6px 0;
  line-height: 1.6;
}

.notice-box p:last-child {
  margin-bottom: 0;
}

/* ==============================================
   5. CONTENT BLOCK & HEADINGS
============================================== */
.content-block { 
  background: var(--white); 
  border-radius: 10px; 
  padding: 30px 25px; 
  margin-bottom: 35px; 
  border: 1px solid var(--border-gray); 
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03); 
  overflow: hidden;
}

h2.block-title { 
  background: var(--z-blue); 
  color: var(--white); 
  padding: 14px 20px; 
  font-size: 1.25em; 
  margin: -30px -25px 25px -25px; 
  font-weight: bold; 
  font-family: var(--hiram6);
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 9px 9px 0 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

h2.block-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: #ffffff;
  border-radius: 2px;
}

h3.section-title { 
  color: var(--z-blue); 
  font-size: 1.1em; 
  border-left: 5px solid var(--z-blue); 
  padding: 8px 14px; 
  background: var(--z-blue-bg); 
  margin: 25px 0 15px; 
  font-weight: bold; 
  font-family: var(--hiram6);
  border-radius: 0 6px 6px 0;
}

h3.section-title:first-of-type { 
  margin-top: 0; 
}

.discount-notice-box {
  background: #fffdf5;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.9em;
  color: #78350f;
}

.discount-notice-box .notice-title {
  font-weight: bold;
  font-size: 1em;
  color: #b45309;
  margin: 0 0 6px 0;
}

.discount-notice-box p {
  margin: 0;
  line-height: 1.5;
}

/* ==============================================
   6. 2-COLUMN GRID & STEP CARDS (スマホ接地防止)
============================================== */
.two-column-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px;
  margin-bottom: 25px;
  width: 100%;
  box-sizing: border-box;
}

.step-card {
  background: #f8fafc;
  border: 1px solid var(--border-gray);
  border-radius: 8px;
  padding: 16px;
  box-sizing: border-box;
}

.step-header-box {
  margin-bottom: 10px;
}

.step-badge {
  display: inline-block;
  background: var(--z-blue);
  color: #fff;
  font-weight: bold;
  font-size: 0.8em;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.step-badge-sub {
  background: #475569;
}

.step-instruction {
  font-weight: bold;
  font-size: 0.95em;
  color: #1e293b;
  margin: 0;
}

@media (max-width: 768px) {
  .two-column-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ==============================================
   7. PAYMENT INFO & DISCOUNT BOX
============================================== */
.payment-info-box {
  background-color: var(--z-blue-bg);
  border: 1px solid var(--border-gray);
  border-radius: 8px;
  padding: 20px 22px;
  margin: 25px 0 30px 0;
}

.payment-lead {
  color: var(--z-blue);
  font-weight: bold;
  font-size: 1em;
  margin: 0 0 10px 0;
}

.payment-notes {
  list-style: none;
  padding-left: 0;
  margin: 0 0 15px 0;
}

.payment-notes li {
  position: relative;
  padding-left: 1.2em;
  font-size: 0.88em;
  color: #444;
  line-height: 1.6;
  margin-bottom: 6px;
}

.payment-notes li:last-child {
  margin-bottom: 0;
}

.payment-notes li::before {
  content: "●";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.7em;
  color: var(--z-blue);
  line-height: 2.2;
}

.discount-banner {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.discount-chip {
  background: #fff;
  border: 1px solid var(--border-gray);
  border-radius: 6px;
  padding: 8px 14px;
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.discount-chip .badge {
  display: inline-block;
  background: var(--z-red, #e53e3e);
  color: #fff;
  font-size: 0.75em;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 4px;
}

.discount-chip .badge-sub {
  background: #64748b;
}

.discount-chip .text {
  font-weight: bold;
  font-size: 0.95em;
  color: var(--black);
}

/* ==============================================
   8. INFO CARD BOX & HIGHLIGHT BOX
============================================== */
.info-card-box {
  background: #fff;
  border: 1px solid var(--border-gray);
  border-top: 3px solid var(--z-blue);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 25px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.info-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  color: var(--z-blue);
  font-size: 1.05em;
  margin-bottom: 8px;
}

.info-card-content {
  margin: 0;
  font-size: 0.93em;
  color: #334155;
  line-height: 1.5;
}

.highlight-action-box { 
  background-color: var(--z-blue-bg); 
  border: 2px solid var(--border-gray); 
  border-radius: 12px; 
  padding: 30px 20px; 
  text-align: center; 
}
.highlight-action-box p { 
  color: var(--z-blue-light); 
  margin-top: 0; 
}

/* ==============================================
   9. ACCORDION (アコーディオン)
============================================== */
.app-details { 
  margin-bottom: 12px; 
  border: 1.5px solid var(--border-gray); 
  border-radius: 8px; 
  overflow: hidden; 
  background: var(--white); 
  box-shadow: 0 2px 6px rgba(0,0,0,0.02); 
}

.app-summary { 
  padding: 14px 18px; 
  font-weight: bold; 
  font-size: 1em; 
  color: var(--z-blue-light); 
  background: var(--z-blue-bg);
  cursor: pointer; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  list-style: none; 
  transition: all 0.2s ease; 
}
.app-summary::-webkit-details-marker { display: none; }

.app-details[open] { 
  border-color: var(--z-blue); 
}
.app-details[open] .app-summary { 
  background: var(--z-blue-bg); 
  border-bottom: 1px solid var(--border-gray); 
}

.toggle-icon::after { 
  content: "\f067"; 
  font-family: var(--FA6); 
  font-weight: 900; 
  font-size: 0.9em; 
  color: var(--z-blue);
}
.app-details[open] .toggle-icon::after { 
  content: "\f068"; 
}

.app-details-content { 
  background: var(--white); 
  padding: 20px; 
}

/* ==============================================
   10. BUTTONS
============================================== */
.btn { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  gap: 8px; 
  padding: 12px 24px; 
  border-radius: 30px; 
  font-weight: bold; 
  text-decoration: none !important; 
  transition: all 0.2s ease; 
  cursor: pointer; 
  border: none; 
}

.btn-primary { 
  background: var(--z-blue); 
  color: var(--white) !important; 
  width: 100%; 
  max-width: 360px; 
  font-size: 1.05em; 
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.btn-primary:hover { 
  opacity: 0.9;
  transform: translateY(-2px); 
}

body.theme-orange .btn-primary {
  background: linear-gradient(135deg, #F39800 0%, #E06D00 100%);
  box-shadow: 0 4px 10px rgba(243, 152, 0, 0.25);
}

.btn-faq-theme {
  background: #ffffff !important;
  color: var(--z-blue-light) !important;
  border: 1.5px solid var(--border-gray) !important;
  border-radius: 8px !important;
  padding: 12px 10px !important;
  font-size: 0.9em !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  text-align: center;
}

.btn-faq-theme:hover {
  background: var(--z-blue-bg) !important;
  border-color: var(--z-blue) !important;
  transform: translateY(-2px);
}

/* ==============================================
   11. TOC NAVIGATION (追従ナビゲーション)
============================================== */
.toc-nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 44px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 9999 !important;
  border-bottom: 2px solid var(--z-blue);
  display: block !important;
  overflow: hidden !important;
  box-sizing: border-box;
}

.toc-list {
  display: flex !important;
  margin: 0;
  padding: 0 10px;
  list-style: none;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap !important;
  -webkit-overflow-scrolling: touch;
  height: 100%;
  align-items: center;
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.toc-list::-webkit-scrollbar {
  display: none !important;
  height: 0 !important;
  width: 0 !important;
}

.toc-list li { 
  flex-shrink: 0; 
}

.toc-list a {
  display: block;
  padding: 8px 12px;
  color: #475569;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.85em;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  text-align: left;
}

.toc-list a.active,
.toc-list a:hover {
  color: var(--z-blue);
  border-bottom-color: var(--z-blue);
}

/* PC（1280px以上）の右サイド配置 */
@media (min-width: 1280px) {
  header.header-area {
    margin-top: 0 !important;
  }

  .toc-nav {
    top: 90px !important;
    left: calc(50% + 500px) !important;
    width: 180px !important;
    height: auto !important;
    background: transparent !important;
    backdrop-filter: none;
    box-shadow: none;
    border-bottom: none;
    border-left: 2px solid var(--border-gray);
    padding-left: 12px;
    overflow: visible !important;
  }

  .toc-list { 
    flex-direction: column !important; 
    align-items: flex-start !important;
    overflow-x: visible !important; 
    overflow-y: visible !important;
    white-space: normal !important; 
    padding: 0;
    height: auto !important;
  }

  .toc-list li {
    width: 100%;
    text-align: left !important;
  }

  .toc-list a {
    padding: 8px 10px;
    font-size: 0.88em;
    border-bottom: none;
    border-left: 3px solid transparent;
    margin-left: -14px;
    text-align: left !important;
    width: 100%;
    box-sizing: border-box;
  }

  .toc-list a.active {
    border-left-color: var(--z-blue);
    color: var(--z-blue-light);
    background-color: var(--z-blue-bg);
    border-radius: 0 4px 4px 0;
  }
}

/* ==============================================
   12. TABLES (会費表・提出課題表)
============================================== */
.table-caption {
  font-size: 0.85em;
  color: #666;
  text-align: right;
  margin-top: -5px;
  margin-bottom: 10px;
}

.fee-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 0 0 10px 0;
  border-radius: 6px;
  border: 1px solid var(--border-gray);
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.fee-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff !important;
  table-layout: auto;
}

.fee-table caption {
  font-weight: bold;
  text-align: left;
  font-size: 0.92em;
  color: var(--z-blue);
  padding: 4px 0 8px 4px;
}

.fee-table th, 
.fee-table td {
  border: 1px solid var(--border-gray);
  padding: 8px 6px;
  font-size: 0.88em;
  line-height: 1.4;
}

.fee-table thead th {
  background-color: #043491 !important;
  color: #ffffff !important;
  font-weight: bold;
  text-align: center;
  padding: 10px 6px;
  vertical-align: middle;
}

.fee-table thead th .header-note-badge {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  font-size: 0.72em;
  font-weight: normal;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 4px;
  line-height: 1.25;
  white-space: nowrap;
}

.fee-table tbody th {
  background-color: #f8fafc;
  font-weight: bold;
  text-align: left;
  vertical-align: middle;
  color: #333333;
  padding: 8px 6px;
  white-space: nowrap;
}

.fee-table .pay-sub {
  display: inline;
  font-size: 1em;
  font-weight: bold;
  color: inherit;
}

.fee-table tbody tr.recommended th {
  background-color: #fff9e6 !important;
  border-right-color: var(--border-gray);
}

.fee-table tbody tr.recommended td {
  background-color: #fffdf5 !important;
}

.recommend-badge {
  display: inline-block;
  background: #f59e0b;
  color: #fff;
  font-size: 0.7em;
  padding: 1px 4px;
  border-radius: 3px;
  margin-right: 2px;
  vertical-align: middle;
  font-weight: bold;
}

.fee-table td {
  text-align: right;
  vertical-align: middle;
  background-color: #ffffff;
}

.fee-table .price-main {
  font-weight: bold;
  font-size: 1.05em;
  color: #1e293b;
}

.fee-table .price-main::after {
  content: " ";
  font-size: 0.8em;
  font-weight: normal;
}

.fee-table .price-sub {
  font-size: 0.9em;
  color: #64748b;
  display: block;
  margin-top: 2px;
}

/* ==============================================
   3列のみのコンパクトな会費表（専科・Asteria Jr.など）のPC表示最適化
   ============================================== */
@media (min-width: 769px) {
  .fee-table-wrapper:has(thead > tr:only-child > th:first-child:nth-last-child(3)) {
    max-width: 660px;
    margin-left: auto;
    margin-right: auto;
  }

  .fee-table:has(thead > tr:only-child > th:first-child:nth-last-child(3)) {
    table-layout: fixed;
  }

  .fee-table:has(thead > tr:only-child > th:first-child:nth-last-child(3)) td {
    padding: 14px 8px;
  }

  .fee-table:has(thead > tr:only-child > th:first-child:nth-last-child(3)) .price-main {
    font-size: 1.18em;
  }

  .table-caption:has(+ .fee-table-wrapper thead > tr:only-child > th:first-child:nth-last-child(3)) {
    max-width: 660px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ==============================================
   2列のみのコンパクトな会費表のPC表示最適化
   ============================================== */
@media (min-width: 769px) {
  .fee-table-wrapper:has(thead > tr:only-child > th:first-child:nth-last-child(2)) {
    max-width: 660px;
    margin-left: auto;
    margin-right: auto;
  }

  .fee-table:has(thead > tr:only-child > th:first-child:nth-last-child(2)) {
    table-layout: fixed;
  }

  .fee-table:has(thead > tr:only-child > th:first-child:nth-last-child(2)) td {
    padding: 14px 8px;
  }

  .fee-table:has(thead > tr:only-child > th:first-child:nth-last-child(2)) .price-main {
    font-size: 1.18em;
  }

  .table-caption:has(+ .fee-table-wrapper thead > tr:only-child > th:first-child:nth-last-child(2)) {
    max-width: 660px;
    margin-left: auto;
    margin-right: auto;
  }
}



/* ==============================================
   13. TIMELINE & CLAIM VISUAL (★完全復元版)
============================================== */
.claim-lead {
  font-size: 0.93em;
  line-height: 1.8;
  color: #444;
  margin-bottom: 25px;
}

.timeline-container {
  background: #ffffff;
  border: 1px solid var(--border-gray);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.timeline-title {
  font-weight: bold;
  color: var(--z-blue);
  font-size: 1.05em;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1em;
  background: var(--z-blue);
  border-radius: 2px;
}

.timeline-box {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
}

/* 学年行 */
.grade-row {
  display: flex;
  align-items: stretch;
  text-align: center;
  font-weight: bold;
  font-size: 0.85em;
  color: #fff;
}

.grade-nensho, 
.grade-nenchu, 
.grade-nencho {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 6px 2px;
  line-height: 1.25;
}

/* 幼児コースの月数比率 */
.grade-nensho { flex: 10; background: #3b82f6; border-right: 1px solid #fff; }
.grade-nenchu { flex: 2; background: #60a5fa; }
.grade-nencho { flex: 10; background: #1d4ed8; }

.sub-m {
  font-size: 0.85em;
  font-weight: normal;
  display: block;
  margin-top: 1px;
}

/* 月行 */
.month-row {
  display: flex;
  text-align: center;
  background: #f8fafc;
  border-top: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
}

.month-item {
  flex: 1;
  padding: 8px 0;
  font-size: 0.8em;
  color: #475569;
  border-right: 1px dashed #e2e8f0;
}

.month-item:last-child { border-right: none; }
.month-item.border-solid { border-right: 2px solid #94a3b8; }

/* 請求バー領域 */
.claim-visual-area {
  padding: 12px 8px;
  background: #fff;
}

.claim-bar-wrapper {
  display: flex;
  align-items: stretch;
  min-height: 40px;
}

.claim-bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #eff6ff;
  border: 2px solid #3b82f6;
  border-radius: 6px;
  font-weight: bold;
  color: #1e40af;
  font-size: 0.85em;
  line-height: 1.25;
  padding: 4px 2px;
}

/* 請求バーの比率 */
.claim-bar-nensho { flex: 10; margin-right: 4px; }
.claim-bar-nenchu { flex: 2; background: #dbeafe; border-color: #60a5fa; }
.claim-bar-full { flex: 10; width: 100%; }

.calc-explanation {
  font-size: 0.9em;
  color: #334155;
  line-height: 1.8;
  background: #f8fafc;
  padding: 14px 18px;
  border-radius: 6px;
  border-left: 4px solid var(--z-blue-light);
  margin-top: 15px;
}

/* ==============================================
   14. STEP LAYOUT (PDF風2列レイアウト)
============================================== */
.step-layout-row {
  display: flex;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 10px;
}

.step-side-panel {
  width: 230px;
  flex-shrink: 0;
}

.step-main-table {
  flex: 1;
  min-width: 0;
}

.step-header-card {
  background: #f8fafc;
  border: 2px solid var(--z-blue-light);
  border-radius: 8px;
  padding: 16px 14px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.step-header-card-sub {
  border-color: #94a3b8;
}

.subject-tags-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.sub-tag {
  background: #fff;
  border: 1.5px solid #3b82f6;
  color: #1d4ed8;
  font-weight: bold;
  font-size: 0.82em;
  text-align: center;
  padding: 4px 2px;
  border-radius: 4px;
}

.sub-tag.full-width {
  grid-column: span 2;
}

.step-sub-text {
  font-size: 0.78em;
  color: #64748b;
  margin: 0; 
  line-height: 1.4;
}
.step-connector-arrow {
  text-align: center;
  font-size: 1.5em;
  color: var(--z-blue-light);
  margin: 15px 0;
}

/* ==============================================
   15. PLAN MODAL & CAROUSEL
============================================== */
.modal-trigger-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 35px;
}

.modal-trigger-card {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid var(--border-gray);
  border-radius: 8px;
  padding: 14px 18px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.modal-trigger-card:hover {
  border-color: var(--z-blue);
  background: var(--z-blue-bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(4, 52, 145, 0.08);
}

.trigger-label {
  display: inline-block;
  background: var(--z-blue);
  color: #fff;
  font-weight: bold;
  font-size: 0.9em;
  padding: 4px 10px;
  border-radius: 4px;
  margin-right: 14px;
  flex-shrink: 0;
}

.trigger-body {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.trigger-title {
  font-weight: bold;
  color: #1e293b;
  font-size: 0.95em;
  line-height: 1.4;
}

.trigger-more {
  font-size: 0.85em;
  color: var(--z-blue);
  white-space: nowrap;
  font-weight: bold;
}

/* モーダル外枠 */
.plan-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  box-sizing: border-box;
}

.plan-modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

.plan-modal-container {
  position: relative;
  background: #ffffff;
  width: 92%;
  max-width: 780px;
  max-height: 90vh;
  border-radius: 14px;
  padding: 40px 24px 24px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  z-index: 2;
  overflow-y: auto;
  box-sizing: border-box;
}

/* 案1：右上閉じるボタン */
.plan-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: #ffffff;
  border: 1.5px solid var(--border-gray);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.16);
  transition: all 0.2s ease;
  z-index: 20;
}

.plan-modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: var(--z-blue);
  transform: scale(1.08);
}

/* カルーセル機構 */
.plan-carousel-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 0 26px;
  box-sizing: border-box;
}

.plan-carousel-track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  width: 100%;
}

.plan-carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 6px;
  opacity: 0.35;
  transform: scale(0.96);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.plan-carousel-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.slide-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}

.slide-badge {
  display: inline-block;
  background: var(--z-blue);
  color: #fff;
  font-weight: bold;
  font-size: 0.8em;
  padding: 3px 8px;
  border-radius: 4px;
}

.slide-title {
  font-size: 1.25em;
  font-weight: bold;
  color: var(--z-blue);
  margin: 0;
}

.slide-content-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  align-items: start;
}

.slide-img-box {
  background: #f8fafc;
  border: 1px solid var(--border-gray);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.slide-img-box img {
  max-width: 100% !important;
  max-height: 230px !important;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

.slide-text-box {
  min-width: 0;
}

.slide-desc {
  font-size: 0.95em;
  color: #334155;
  line-height: 1.7;
  margin: 0 0 12px 0;
}

.rank-guide-box {
  background: var(--z-blue-bg);
  border: 1px solid var(--border-gray);
  border-radius: 6px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 0.88em;
  color: var(--z-blue);
}

/* 左右矢印ボタン */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.96);
  border: 1.5px solid var(--border-gray);
  color: var(--z-blue);
  font-size: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s;
  z-index: 5;
}
.carousel-arrow:hover {
  background: var(--z-blue);
  color: #fff;
  border-color: var(--z-blue);
}
.carousel-arrow.prev { left: 0px; }
.carousel-arrow.next { right: 0px; }

/* ドットインジケーター */
.plan-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.plan-carousel-dots .dot {
  width: 10px;
  height: 10px;
  background: #cbd5e1;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.25s ease;
}

.plan-carousel-dots .dot.active {
  background: var(--z-blue);
  width: 24px;
  border-radius: 10px;
}

/* 案3：モーダル下部閉じるボタン */
.plan-modal-footer {
  text-align: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-gray);
}

.plan-modal-btn-close {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid var(--border-gray);
  border-radius: 20px;
  padding: 8px 32px;
  font-size: 0.9em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
}

.plan-modal-btn-close:hover {
  background: #e2e8f0;
  color: #1e293b;
  border-color: #94a3b8;
}

/* ==============================================
   16. PAGETOP & UTILITIES
============================================== */
.pagetop { 
  position: fixed; 
  right: 20px; 
  bottom: 20px; 
  z-index: 100; 
}
.pagetop a { 
  display: block; 
  width: 48px; 
  height: 48px; 
  background: var(--z-blue); 
  color: #fff; 
  border-radius: 50%; 
  text-align: center; 
  line-height: 48px; 
  font-size: 18px; 
  text-decoration: none; 
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  transition: 0.2s;
}
.pagetop a:hover { 
  transform: scale(1.08); 
}

.text-link { color: var(--link); font-weight: bold; text-decoration: underline; }
.txt-blue { color: var(--z-blue-light); }
.txt-red { color: var(--z-red); }
.fwB { font-weight: bold; }
.MT40 { margin-top: 40px; }
.MT20 { margin-top: 20px; }
.MT15 { margin-top: 15px; }
.MT10 { margin-top: 10px; }
.M0 { margin: 0; }
.text-center { text-align: center; }

ul.arrow-list { list-style: none; padding-left: 0; }
ul.arrow-list li { position: relative; padding-left: 1.4em; margin-bottom: 8px; line-height: 1.6; }
ul.arrow-list li::before { font-family: var(--FA6); content: "\f054"; font-weight: 900; position: absolute; left: 0; top: 3px; font-size: 0.8em; color: var(--z-blue-light); }

/* ==============================================
   17. FOOTER
============================================== */
footer { 
  width: 100%; 
  text-align: center; 
  color: var(--white); 
  background-color: var(--blue); 
  padding: 30px 0; 
  margin-top: 40px; 
}

.footer-content { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  width: 90%; 
  max-width: 980px; 
  margin: 0 auto; 
}

.footer-content p { font-size: 0.8em; margin: 0; }

/* ==============================================
   18. RESPONSIVE ADJUSTMENTS (860px以下 / 768px以下)
============================================== */
@media (max-width: 860px) {
  .step-layout-row {
    flex-direction: column;
    gap: 12px;
  }

  .step-side-panel {
    width: 100%;
  }

  .step-header-card {
    height: auto;
  }

  .content-block { padding: 20px 12px; }
  h2.block-title { padding: 12px 15px; margin: -20px -12px 20px -12px; font-size: 1.1em; }

  /* 会費表の2段組スタイル */
  .fee-table tbody th {
    padding: 8px 4px;
  }

  .fee-table .pay-sub {
    display: block;
    font-size: 0.8em;
    font-weight: normal;
    color: #64748b;
    margin-top: 2px;
  }

  .recommend-badge {
    display: block;
    width: fit-content;
    margin-bottom: 2px;
    font-size: 0.65em;
    padding: 1px 4px;
  }

  .fee-table th, .fee-table td {
    padding: 6px 4px;
    font-size: 0.82em;
  }

  /* ★タイムライン（スマホ用最適化） */
  .timeline-container { padding: 15px 10px; }
  .grade-row { font-size: 0.78em; }
  .sub-m { font-size: 0.75em; }
  .month-item { font-size: 0.72em; padding: 6px 0; }
  .claim-bar { font-size: 0.75em; padding: 4px 1px; }

  .footer-content { flex-direction: column; gap: 10px; }
}

@media (max-width: 768px) {
  .plan-modal-container {
    padding: 35px 14px 18px;
    width: 95%;
  }

  .plan-carousel-wrapper {
    padding: 0 16px;
  }

  .slide-content-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .slide-img-box {
    min-height: auto;
    padding: 8px;
  }

  .slide-img-box img {
    max-height: 170px !important;
  }
}