/* ============================================
   Churakids 体験申込フォーム - 統合スタイル
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800&display=swap');

/* ========================================
   CSS Variables
======================================== */
:root {
  --ck-accent: #0885cd;
  --ck-accent-light: #0996e6;
  --ck-accent-dark: #065a8c;
  --ck-accent-pale: #e3f3fc;
  --ck-yellow: #facc15;
  --ck-black: #333;
  --ck-gray: #6b7280;
  --ck-light-gray: #f8fafc;
  --ck-border: #e0e0e0;
  --ck-white: #fff;
  --ck-success: #10b981;
  --ck-error: #ef4444;
}

/* ページ固有の変数（後方互換） */
body.page-id-9159 {
  --primary: #0885cd;
  --primary-light: #0a9de8;
  --dark-bg: #333333;
  --text: #333333;
  --text-light: #666666;
  --bg: #FAFAFA;
  --white: #FFFFFF;
  --border: #E0E0E0;
  --error: #D94747;
  
  margin: 0 !important;
  padding: 0 !important;
  font-family: 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Noto Sans JP', sans-serif;
  background: var(--bg) !important;
  color: var(--text);
  line-height: 1.6;
}

/* ============================================
   ヘッダー
   ============================================ */
.page-id-9159 .contact-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--dark-bg);
  padding: 12px 16px;
  width: 100%;
  box-sizing: border-box;
  color: var(--white);
}

.page-id-9159 .header-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-id-9159 .header-logo {
  font-size: 1.2rem;
  font-weight: 800 !important;
  font-family: 'Noto Sans JP', 'Yu Gothic', 'Hiragino Kaku Gothic ProN', sans-serif !important;
  color: var(--white) !important;
  text-decoration: none;
  letter-spacing: 0.05em;
}

/* ハンバーガーメニュー */
.page-id-9159 .nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.page-id-9159 .nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--white);
  transition: 0.2s;
}

.page-id-9159 .nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.page-id-9159 .nav-toggle.active span:nth-child(2) { opacity: 0; }
.page-id-9159 .nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

.page-id-9159 .header-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--dark-bg);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s;
  width: 100%;
}

.page-id-9159 .header-nav.open { max-height: 300px; }

.page-id-9159 .header-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-id-9159 .header-nav a {
  display: block;
  padding: 12px 20px;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.page-id-9159 .header-nav a:hover { background: rgba(255,255,255,0.1); }

/* ============================================
   Hero
   ============================================ */
/* ★修正: FREE TRIAL LESSONの下の隙間をさらに詰める */
.page-id-9159 .hero-title-section {
  padding: 24px 16px 0;
  text-align: center;
  margin-bottom: 0;
}

.page-id-9159 .contact-hero {
  background: var(--white);
  position: relative;
  min-height: 300px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (max-width: 767px) {
  .page-id-9159 .contact-hero {
    min-height: 150px;
  }
}

.page-id-9159 .hero-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 4px; /* ★下マージン縮小 */
  color: var(--text);
}

.page-id-9159 .hero-subtitle {
  font-size: 0.65rem;
  color: var(--text-light);
  margin: 0; /* ★マージン削除 */
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ============================================
   メインエリア
   ============================================ */
.page-id-9159 .contact-main {
  padding: 20px 16px 80px; /* ★上パディング縮小 */
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* ============================================
   CF7 基本スタイル
   ============================================ */
.page-id-9159 .wpcf7,
.wpcf7 {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 auto 2em !important;
  max-width: 600px;
}

.wpcf7-form {
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ck-black);
}

.page-id-9159 .wpcf7-form p {
  margin-bottom: 24px;
}

/* ★修正: 「体験希望日を選択」を非表示（JSでも制御） */
.wpcf7-form > p:first-child {
  display: none !important;
}

/* ★修正: 「体験希望日を選択」の見出し（h3）も非表示 */
.schedule-card-wrapper + h3,
.wpcf7-form h3:first-of-type {
  display: none !important;
}

/* ★修正: 必須マーク「*」の改行防止 */
.page-id-9159 .wpcf7-form label,
.wpcf7-form label {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ck-black);
  margin-bottom: 20px;
}

.page-id-9159 .wpcf7-form label br {
  display: none;
}

/* 必須マーク「*」のスタイル */
.required-asterisk {
  color: var(--ck-error) !important;
  font-weight: 700;
  margin-left: 2px;
  display: inline !important;
  white-space: nowrap;
}

/* ★修正: 大項目（保護者情報など）のスタイル */
.wpcf7-form h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ck-black);
  margin: 32px 0 20px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--ck-accent-pale) 0%, #f0f9ff 100%);
  border-left: 4px solid var(--ck-accent);
  border-radius: 0 8px 8px 0;
}

/* ★修正: 区切り線（hr）を非表示 */
.wpcf7-form hr {
  display: none !important;
}

/* ★修正: CF7/wpautopが生成するp内のbrタグ（余白の原因）を非表示 */
.wpcf7-form p:has(.schedule-card-wrapper) br {
  display: none;
}

/* ★修正: CF7が生成する空のpタグを非表示 */
.wpcf7-form p:empty {
  display: none !important;
}

/* ★修正: スケジュールカードを含むpタグの下余白を除去 */
.wpcf7-form p:has(.schedule-card-wrapper) {
  margin-bottom: 0 !important;
}

/* ========================================
   Loading
======================================== */
.form-loading-overlay {
  padding: 80px 20px;
  text-align: center;
}

.form-loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--ck-accent-pale);
  border-top-color: var(--ck-accent);
  border-radius: 50%;
  animation: ck-spin 0.8s linear infinite;
  margin: 0 auto 24px;
}

.form-loading-text {
  color: var(--ck-gray);
  font-size: 14px;
}

@keyframes ck-spin {
  to { transform: rotate(360deg); }
}

.form-content-hidden > *:not(.form-loading-overlay):not(.confirm-section) {
  display: none !important;
}

/* ========================================
   Schedule Card
======================================== */
.schedule-card-wrapper {
  margin-bottom: 8px;
}

.schedule-card {
  border: 2px solid var(--ck-border);
  border-radius: 12px;
  padding: 24px;
  background: var(--ck-light-gray);
  transition: all 0.3s ease;
}

.schedule-card.selected {
  border-color: var(--ck-accent);
  background: var(--ck-white);
  box-shadow: 0 4px 12px rgba(8, 133, 205, 0.15);
}

.schedule-card-empty {
  color: var(--ck-gray);
  text-align: center;
  padding: 20px;
  font-size: 14px;
}

.schedule-card-empty::before {
  content: "📅";
  display: block;
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.schedule-card-content {
  display: none;
}

.schedule-card.selected .schedule-card-content {
  display: block;
}

.schedule-card.selected .schedule-card-empty {
  display: none;
}

.schedule-card-badge {
  display: inline-block;
  background: var(--ck-accent);
  color: var(--ck-white);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

/* ★修正: カード内の日付と時間は大きく */
.schedule-card-date {
  font-size: 21px;
  font-weight: 700;
  color: var(--ck-black);
  margin-bottom: 0;
}

.schedule-card-time {
  font-family: 'Montserrat', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--ck-accent);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.schedule-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  color: var(--ck-gray);
}

.schedule-card-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

/* 「残りN枠」だけ小さめに */
.schedule-card-remaining {
  color: var(--ck-success);
  font-weight: 600;
  font-size: 12px;
}

.schedule-card-remaining.few {
  color: #f59e0b;
}

/* ★修正: カード直下の区切り線を削除 */
.schedule-card-change {
  display: none;
  text-align: center;
  margin-top: 4px;
  padding-top: 4px;
  border-top: none;
}

.schedule-card.selected .schedule-card-change {
  display: block;
}

.schedule-card-change button {
  background: none;
  border: none;
  color: var(--ck-accent);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.schedule-card-change button:hover {
  color: var(--ck-accent-dark);
}

/* ========================================
   Schedule Select Button
======================================== */
.schedule-select-btn {
  display: block;
  width: 100%;
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ck-white);
  background: var(--ck-accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(8, 133, 205, 0.25);
}

.schedule-select-btn:hover {
  background: var(--ck-accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(8, 133, 205, 0.3);
}

.schedule-select-btn:active {
  transform: translateY(0);
}

/* ========================================
   Schedule Modal
======================================== */
.schedule-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.schedule-modal-overlay.active {
  display: flex;
}

.schedule-modal {
  background: var(--ck-white);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.schedule-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--ck-border);
  background: var(--ck-light-gray);
}

.schedule-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ck-black);
  padding: 0;
  background: none;
  border: none;
  border-left: none;
  border-radius: 0;
}

.schedule-modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--ck-gray);
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
  line-height: 1;
}

.schedule-modal-close:hover {
  background: var(--ck-border);
  color: var(--ck-black);
}

.schedule-modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}

.schedule-modal-confirm {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ck-white);
  background: var(--ck-accent);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(8, 133, 205, 0.25);
}

.schedule-modal-confirm:hover {
  background: var(--ck-accent-dark);
  transform: translateY(-1px);
}

.schedule-modal-confirm:active {
  transform: translateY(0);
}

/* ========================================
   Form Elements
======================================== */
.wpcf7-form label > span:first-child,
.form-field-label {
  display: inline;
  font-size: 14px;
  font-weight: 600;
  color: var(--ck-black);
}

.wpcf7-form .wpcf7-form-control-wrap {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box;
}

.form-field-required {
  color: var(--ck-error);
  font-size: 11px;
  font-weight: 600;
  margin-left: 2px;
  display: inline;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="date"],
.wpcf7-form input[type="number"],
.wpcf7-form select,
.wpcf7-form textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.2;
  border: 2px solid var(--ck-border);
  border-radius: 8px;
  background: var(--ck-white);
  color: var(--ck-black);
  transition: all 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  margin-top: 8px;
}

.wpcf7-form input:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--ck-accent);
  box-shadow: 0 0 0 3px var(--ck-accent-pale);
}

.wpcf7-form select {
  width: 100% !important;
  min-height: 52px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.wpcf7-form textarea {
  min-height: 80px; /* ★高さを抑えた */
  resize: vertical;
}

/* Date field fix */
.wpcf7 input[type="date"],
input[type="date"] {
  max-width: 100% !important;
}

/* Schedule Select (in modal) */
#schedule-select-new {
  width: 100%;
  margin-top: 0;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid var(--ck-border);
  border-radius: 8px;
  background: var(--ck-white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

#schedule-select-new:focus {
  outline: none;
  border-color: var(--ck-accent);
  box-shadow: 0 0 0 3px var(--ck-accent-pale);
}

/* ★修正: チェックボックス・ラジオの枠を削除、1カラム表示 */
.wpcf7-form .wpcf7-checkbox,
.wpcf7-form .wpcf7-radio {
  display: flex;
  flex-direction: column; /* ★1カラムに */
  gap: 8px;
  padding: 0 !important; /* ★親要素からの内側余白を削除 */
  margin: 0 !important;
}

/* チェックボックスのラッパー要素もインデント削除 */
.wpcf7-form .wpcf7-form-control-wrap:has(.wpcf7-checkbox),
.wpcf7-form .wpcf7-form-control-wrap:has(.wpcf7-radio) {
  padding: 0 !important;
  margin: 0 !important;
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item,
.wpcf7-form .wpcf7-radio .wpcf7-list-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border: none !important;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  background: none !important;
  margin: 0 !important; /* ★インデント削除 */
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item:hover,
.wpcf7-form .wpcf7-radio .wpcf7-list-item:hover {
  color: var(--ck-accent);
  background: none !important;
  border: none !important;
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item:has(input:checked),
.wpcf7-form .wpcf7-radio .wpcf7-list-item:has(input:checked) {
  color: var(--ck-accent);
  font-weight: 600;
  background: none !important;
  border: none !important;
}

/* チェックボックス自体のスタイル */
.wpcf7-form .wpcf7-list-item-label {
  cursor: pointer;
  flex: 1;
  padding: 2px 0;
  user-select: none;
  -webkit-user-select: none;
}

.wpcf7-form .wpcf7-checkbox input[type="checkbox"],
.wpcf7-form .wpcf7-radio input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--ck-accent);
  cursor: pointer;
  margin: 0;
}

/* ========================================
   Validation Errors
======================================== */
.validation-error {
  border-color: var(--ck-error) !important;
}

.validation-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.validation-error-message {
  display: block;
  color: var(--ck-error);
  font-size: 12px;
  margin-top: 6px;
  padding-left: 4px;
}

.validation-error-message::before {
  content: "⚠ ";
}

.wpcf7-not-valid-tip {
  display: none !important;
}

/* ========================================
   Submit Button
======================================== */
/* ★修正: 確認画面へボタンを大きく、文字の位置を中央に */
.wpcf7-form .wpcf7-submit,
.wpcf7-form .ck-confirm-btn,
.form-submit-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  max-width: 360px;
  margin: 32px auto 0;
  padding: 20px 32px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ck-white);
  background: var(--ck-accent);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(8, 133, 205, 0.3);
  -webkit-appearance: none;
  appearance: none;
  line-height: 1.2;
  min-height: 64px;
  text-align: center;
}

.wpcf7-form .wpcf7-submit:hover,
.wpcf7-form .ck-confirm-btn:hover,
.form-submit-btn:hover {
  background: var(--ck-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(8, 133, 205, 0.4);
}

.wpcf7-form .wpcf7-submit:active,
.wpcf7-form .ck-confirm-btn:active,
.form-submit-btn:active {
  transform: translateY(0);
}

/* ========================================
   Confirm Section
======================================== */
.confirm-section {
  display: none;
}

.confirm-section.active {
  display: block;
}

.confirm-section h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ck-black);
  margin-bottom: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--ck-accent-pale) 0%, #f0f9ff 100%);
  border-left: 4px solid var(--ck-accent);
  border-radius: 0 8px 8px 0;
}

.confirm-desc {
  color: var(--ck-gray);
  font-size: 14px;
  margin-bottom: 24px;
}

.confirm-section table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.confirm-section th,
.confirm-section td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--ck-border);
  font-size: 14px;
}

.confirm-section th {
  background: var(--ck-light-gray);
  color: var(--ck-gray);
  font-weight: 600;
  width: 35%;
  border-radius: 4px 0 0 4px;
}

.confirm-section td {
  color: var(--ck-black);
  border-radius: 0 4px 4px 0;
}

.confirm-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
  margin: 0 auto;
}

.confirm-btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 32px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ck-white);
  background: var(--ck-accent);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(8, 133, 205, 0.3);
  min-height: 64px;
  line-height: 1.2;
}

.confirm-btn-submit:hover {
  background: var(--ck-accent-dark);
  transform: translateY(-2px);
}

.confirm-btn-back {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ck-gray);
  background: var(--ck-white);
  border: 2px solid var(--ck-border);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.confirm-btn-back:hover {
  border-color: var(--ck-gray);
  color: var(--ck-black);
}

/* ========================================
   Confirm Screen (ck-confirm-*)
======================================== */
.ck-confirm-container {
  padding: 0;
}

.ck-confirm-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ck-black);
  margin: 0 0 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--ck-accent-pale) 0%, #f0f9ff 100%);
  border-left: 4px solid var(--ck-accent);
  border-radius: 0 8px 8px 0;
}

.ck-confirm-subtitle {
  color: var(--ck-gray);
  font-size: 14px;
  margin-bottom: 20px;
}

.ck-confirm-table {
  width: 100%;
  margin-bottom: 24px;
}

.ck-confirm-row {
  display: flex;
  border-bottom: 1px solid var(--ck-border);
}

.ck-confirm-row:last-child {
  border-bottom: none;
}

.ck-confirm-label {
  width: 35%;
  flex-shrink: 0;
  padding: 12px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ck-gray);
  background: var(--ck-light-gray);
}

.ck-confirm-value {
  flex: 1;
  padding: 12px 12px;
  font-size: 14px;
  color: var(--ck-black);
  word-break: break-word;
}

.ck-confirm-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
  margin: 0 auto;
}

.ck-confirm-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 20px 32px;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  color: var(--ck-white);
  background: var(--ck-accent);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(8, 133, 205, 0.3);
  min-height: 64px;
  line-height: 1.2;
}

.ck-confirm-send-btn:hover {
  background: var(--ck-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(8, 133, 205, 0.4);
}

.ck-confirm-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--ck-gray);
  background: var(--ck-white);
  border: 2px solid var(--ck-border);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ck-confirm-back-btn:hover {
  border-color: var(--ck-gray);
  color: var(--ck-black);
}

@media (max-width: 480px) {
  .ck-confirm-row {
    flex-direction: column;
  }

  .ck-confirm-label {
    width: 100%;
    padding: 8px 12px 4px;
  }

  .ck-confirm-value {
    padding: 4px 12px 10px;
  }
}

/* ========================================
   Hidden & Utility
======================================== */
.form-hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ★修正: 最下部の注釈文章を小さく */
.wpcf7-form > p:last-of-type {
  font-size: 12px !important;
  color: var(--ck-gray);
  line-height: 1.6;
}

/* 送信ボタンを含むpタグの次のpタグ（注釈文） */
.wpcf7-form p:has(.wpcf7-submit) ~ p {
  font-size: 12px !important;
  color: var(--ck-gray);
  line-height: 1.6;
  margin-top: 16px;
}

/* ★確認ボタン直前の注釈文（送信ボタンの親pの中のテキスト） */
.wpcf7-form p:has(.wpcf7-submit) {
  font-size: 12px !important;
  color: var(--ck-gray);
  line-height: 1.8;
}

/* 送信ボタン自体は大きいまま維持 */
.wpcf7-form p:has(.wpcf7-submit) .wpcf7-submit {
  font-size: 18px !important;
}

/* 注釈文のコンテナ */
.form-footer-note {
  font-size: 12px !important;
  color: var(--ck-gray);
  line-height: 1.6;
  margin-top: 16px;
  text-align: center;
}

/* ========================================
   Step Wizard
======================================== */
.step-wizard {
  margin-bottom: 32px;
}

/* Progress bar */
.step-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
  padding: 0 8px;
}

.step-progress-item {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ck-border);
  transition: color 0.3s ease;
  white-space: nowrap;
}

.step-progress-item.active {
  color: var(--ck-accent);
}

.step-progress-item.done {
  color: var(--ck-success);
}

.step-progress-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--ck-border);
  font-size: 13px;
  font-weight: 700;
  margin-right: 6px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.step-progress-item.active .step-progress-num {
  border-color: var(--ck-accent);
  background: var(--ck-accent);
  color: var(--ck-white);
}

.step-progress-item.done .step-progress-num {
  border-color: var(--ck-success);
  background: var(--ck-success);
  color: var(--ck-white);
}

.step-progress-arrow {
  margin: 0 10px;
  color: var(--ck-border);
  font-size: 12px;
  flex-shrink: 0;
}

/* Selection Breadcrumb */
.step-breadcrumb {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  margin-bottom: 4px;
  background: #f0f7fc;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
}

.step-breadcrumb:not([style*="display: none"]) {
  display: flex;
}

.step-bc-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  background: #fff;
  border-radius: 20px;
  color: #333;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid #d8e8f3;
}

.step-bc-item.clickable {
  cursor: pointer;
  transition: all 0.15s ease;
}

.step-bc-item.clickable:hover {
  background: var(--ck-primary);
  color: #fff;
  border-color: var(--ck-primary);
}

.step-bc-item.current {
  background: var(--ck-primary);
  color: #fff;
  border-color: var(--ck-primary);
}

.step-bc-icon {
  font-size: 13px;
}

.step-bc-sep {
  color: #b0c4d8;
  font-size: 14px;
  margin: 0 2px;
}

/* Step panels */
.step-panel {
  display: none;
  animation: stepFadeIn 0.3s ease;
}

.step-panel.active {
  display: block;
}

@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ck-black);
  margin-bottom: 16px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--ck-accent-pale) 0%, #f0f9ff 100%);
  border-left: 4px solid var(--ck-accent);
  border-radius: 0 8px 8px 0;
}

/* Location buttons */
.step-location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.step-location-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  background: var(--ck-white);
  border: 2px solid var(--ck-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-align: center;
}

.step-location-btn:hover {
  border-color: var(--ck-accent);
  background: var(--ck-accent-pale);
}

.step-location-btn.selected {
  border-color: var(--ck-accent);
  background: var(--ck-accent-pale);
  box-shadow: 0 2px 8px rgba(8, 133, 205, 0.2);
}

.step-location-icon {
  font-size: 28px;
  line-height: 1;
}

.step-location-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ck-black);
}

.step-location-sub {
  font-size: 12px;
  color: var(--ck-gray);
}

/* Category buttons */
.step-category-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-category-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  background: var(--ck-white);
  border: 2px solid var(--ck-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-align: left;
  width: 100%;
}

.step-category-btn:hover {
  border-color: var(--ck-accent);
  background: #f7fbff;
}

.step-category-btn.selected {
  border-color: var(--ck-accent);
  background: var(--ck-accent-pale);
}

.step-category-icon {
  font-size: 32px;
  flex-shrink: 0;
  width: 44px;
  text-align: center;
}

.step-category-info {
  flex: 1;
  min-width: 0;
}

.step-category-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ck-black);
  line-height: 1.3;
}

.step-category-count {
  font-size: 12px;
  color: var(--ck-gray);
  margin-top: 3px;
}

.step-category-arrow {
  color: var(--ck-border);
  font-size: 16px;
  flex-shrink: 0;
}

.step-category-btn.selected .step-category-arrow {
  color: var(--ck-accent);
}

/* Class buttons */
.step-class-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-class-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--ck-white);
  border: 2px solid var(--ck-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-align: left;
  width: 100%;
}

.step-class-btn:hover {
  border-color: var(--ck-accent);
  background: #f7fbff;
}

.step-class-btn.selected {
  border-color: var(--ck-accent);
  background: var(--ck-accent-pale);
}

.step-class-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.step-class-info {
  flex: 1;
  min-width: 0;
}

.step-class-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ck-black);
  line-height: 1.3;
}

.step-class-count {
  font-size: 12px;
  color: var(--ck-gray);
  margin-top: 2px;
}

.step-class-arrow {
  color: var(--ck-border);
  font-size: 16px;
  flex-shrink: 0;
}

.step-class-btn.selected .step-class-arrow {
  color: var(--ck-accent);
}

/* Schedule slot buttons */
.step-slot-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-slot-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--ck-white);
  border: 2px solid var(--ck-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  width: 100%;
  text-align: left;
}

.step-slot-btn:hover {
  border-color: var(--ck-accent);
  background: #f7fbff;
}

.step-slot-btn.selected {
  border-color: var(--ck-accent);
  background: var(--ck-accent-pale);
  box-shadow: 0 2px 8px rgba(8, 133, 205, 0.15);
}

.step-slot-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--ck-light-gray);
}

.step-slot-btn:disabled:hover {
  border-color: var(--ck-border);
  background: var(--ck-light-gray);
}

.step-slot-date {
  font-size: 15px;
  font-weight: 700;
  color: var(--ck-black);
}

.step-slot-time {
  font-size: 14px;
  color: var(--ck-gray);
  margin-top: 2px;
}

.step-slot-status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.step-slot-status.available {
  background: #ecfdf5;
  color: #059669;
}

.step-slot-status.few {
  background: #fffbeb;
  color: #d97706;
}

.step-slot-status.full {
  background: #fef2f2;
  color: #dc2626;
}

/* Empty state */
.step-empty {
  text-align: center;
  padding: 32px 20px;
  background: var(--ck-white);
  border-radius: 12px;
  border: 2px dashed var(--ck-border);
}

.step-empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.step-empty-text {
  font-size: 14px;
  color: var(--ck-gray);
  margin-bottom: 16px;
}

.step-empty-link {
  display: inline-block;
  padding: 10px 24px;
  background: var(--ck-accent);
  color: var(--ck-white);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
}

.step-empty-link:hover {
  background: var(--ck-accent-dark);
}

/* Back link in steps */
.step-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--ck-white);
  border: 1.5px solid var(--ck-border);
  border-radius: 50px;
  color: var(--ck-gray);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  margin-bottom: 16px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.step-back:hover {
  color: var(--ck-accent);
  border-color: var(--ck-accent);
  background: #f7fbff;
}

.step-back-bottom {
  margin-top: 20px;
  margin-bottom: 0;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Selection summary card (shown after step 3) */
.step-summary {
  border: 2px solid var(--ck-accent);
  border-radius: 12px;
  padding: 20px;
  background: var(--ck-white);
  box-shadow: 0 4px 12px rgba(8, 133, 205, 0.1);
  margin-bottom: 8px;
}

.step-summary-badge {
  display: inline-block;
  background: var(--ck-accent);
  color: var(--ck-white);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.step-summary-date {
  font-size: 20px;
  font-weight: 700;
  color: var(--ck-black);
  margin-bottom: 2px;
}

.step-summary-time {
  font-family: 'Montserrat', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--ck-accent);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.step-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--ck-gray);
}

.step-summary-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Form section that appears after step completion */
.step-form-section {
  display: none;
  animation: stepFadeIn 0.4s ease;
}

.step-form-section.active {
  display: block;
}

.step-form-section h3:first-of-type {
  margin-top: 0;
}

/* ステップUI使用時、trial-form先頭の不要な見出し・br・空要素を非表示 */
.step-form-section .trial-form > h3:first-child {
  display: none !important;
}

.step-form-section .trial-form > p:first-of-type {
  display: none !important;
}

.step-form-section .trial-form > hr {
  display: none !important;
}

.step-form-section .trial-form > p:empty {
  display: none !important;
}

.step-form-section .trial-form > p > br:only-child {
  display: none !important;
}

/* Step wizard validation error */
.step-wizard .validation-error-message {
  margin-top: 8px;
}

@media (max-width: 480px) {
  .step-progress {
    gap: 0;
  }
  
  .step-progress-item {
    font-size: 11px;
  }
  
  .step-progress-num {
    width: 22px;
    height: 22px;
    font-size: 10px;
    margin-right: 3px;
  }
  
  .step-progress-arrow {
    margin: 0 4px;
    font-size: 9px;
  }
  
  .step-category-icon {
    font-size: 28px;
    width: 36px;
  }

  .step-category-name {
    font-size: 15px;
  }
  
  .step-location-grid {
    gap: 8px;
  }
  
  .step-location-btn {
    padding: 20px 12px;
  }
  
  .step-summary-time {
    font-size: 24px;
  }
}

/* ============================================
   フッター
   ============================================ */
.page-id-9159 .contact-footer {
  background: var(--dark-bg);
  padding: 40px 16px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  color: rgba(255,255,255,0.7);
  font-family: 'Noto Sans JP', 'Yu Gothic', 'Hiragino Kaku Gothic ProN', sans-serif;
}

.page-id-9159 .footer-logo {
  font-size: 1.2rem;
  font-weight: 800 !important;
  font-family: 'Noto Sans JP', 'Yu Gothic', 'Hiragino Kaku Gothic ProN', sans-serif !important;
  color: var(--white) !important;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
  letter-spacing: 0.05em;
}

.page-id-9159 .footer-links {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 30px;
}

.page-id-9159 .footer-links a {
  font-size: 0.9rem;
  color: var(--white);
  text-decoration: none;
}

.page-id-9159 .footer-links a:hover {
  text-decoration: underline;
}

.page-id-9159 .footer-copyright {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  margin: 0;
}

/* reCAPTCHA非表示 */
.page-id-9159 .grecaptcha-badge { visibility: hidden; }

/* ============================================
   ページ上部へ戻るボタン
   ============================================ */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--ck-accent);
  color: var(--ck-white);
  border: none;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  background: var(--ck-accent-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* ============================================
   PC向け調整
   ============================================ */
@media (min-width: 768px) {
  .page-id-9159 .nav-toggle { display: none; }
  
  .page-id-9159 .header-nav {
    position: static;
    max-height: none;
    background: transparent;
  }
  
  .page-id-9159 .header-nav ul {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    justify-content: flex-end;
  }
  
  .page-id-9159 .header-nav a {
    padding: 8px 12px;
    border-top: none;
    border-radius: 4px;
    color: var(--white);
  }
  
  .page-id-9159 .header-nav a:hover {
    background: rgba(255,255,255,0.1);
  }
}

/* ============================================
   スマホ向け調整
   ============================================ */
@media (max-width: 480px) {
  .schedule-card {
    padding: 20px 16px;
  }
  
  .schedule-card-date {
    font-size: 18px;
  }
  
  .schedule-modal {
    margin: 10px;
    max-height: calc(100vh - 40px);
  }
  
  .schedule-modal-body {
    max-height: calc(100vh - 160px);
  }
  
  .confirm-section th,
  .confirm-section td {
    display: block;
    width: 100%;
  }
  
  .confirm-section th {
    border-bottom: none;
    padding-bottom: 4px;
    border-radius: 4px;
  }
  
  .confirm-section td {
    padding-top: 4px;
    padding-bottom: 16px;
    border-radius: 4px;
  }
  
  .scroll-top-btn {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}
