/* デザインシステム - カラーパレット */
:root {
  /* プライマリカラー（緑系） */
  --color-primary: #4caf50;
  --color-primary-dark: #2e7d32;
  --color-primary-light: #e8f5e8;
  --color-primary-hover: #45a049;

  /* セカンダリカラー（グレー系） */
  --color-secondary: #666;
  --color-secondary-light: #f8f9fa;
  --color-text: #333;
  --color-text-light: #555;
  --color-text-muted: #666;

  /* ステータスカラー */
  --color-success: #4caf50;
  --color-warning: #f57c00;
  --color-error: #d32f2f;
  --color-info: #007bff;

  /* 背景色 */
  --color-bg: #f8f9fa;
  --color-bg-white: #fff;
  --color-bg-light: #f5f5f5;

  /* ボーダー色 */
  --color-border: #ddd;
  --color-border-light: #eee;

  /* フォントサイズ */
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;

  /* スペーシング */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;

  /* ボーダーラディウス */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  /* シャドウ */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 2px 5px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 基本スタイル */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  font-size: var(--font-size-base);
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ヘッダー */
header {
  background-color: var(--color-primary);
  color: white;
  padding: var(--spacing-md) 0;
  margin-bottom: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
}

/* ロゴとタイトルを横並びにするためのコンテナ */
.logo-title-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  flex-shrink: 0;
}

.title-subtitle {
  display: flex;
  flex-direction: column;
}

header h1 {
  margin: 0;
  font-size: 1.55em;
  line-height: 1.2;
}

header p.subtitle {
  margin: 0;
  font-size: 0.9em;
  opacity: 0.9;
}

/* メインコンテンツ */
main {
  margin-bottom: 50px;
}

section {
  margin-bottom: var(--spacing-xl);
}

h2 {
  color: var(--color-primary-dark);
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-xl);
  font-weight: 600;
}

h3 {
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-lg);
  font-weight: 500;
  color: var(--color-text);
}

h4 {
  margin-bottom: var(--spacing-sm);
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--color-primary-dark);
}

/* 日付選択 */
.date-picker {
  background-color: var(--color-bg-white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-lg);
  border: 1px solid var(--color-border-light);
  transition: box-shadow 0.2s ease;
}

.date-picker:hover {
  box-shadow: var(--shadow-lg);
}

.date-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.date-input {
  padding: var(--spacing-sm) var(--spacing-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.date-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
  font-size: var(--font-size-base);
  text-align: center;
  width: 180px;
  cursor: pointer;
}

/* Flatpickrのカレンダーアイコンと重ならないように */
.flatpickr-input {
  padding-right: 30px !important;
  /* Flatpickr自体の調整なので !important は許容 */
}

/* 前日/翌日ボタンのスタイル */
.btn-control {
  background-color: #f1f3f4;
  border: 1px solid #ddd;
  padding: 12px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-control:hover {
  background-color: #e8eaed;
}

/* ボタンが無効状態のスタイル (JavaScriptで制御) */
.btn-control:disabled,
.btn-control[disabled] {
  background-color: #e9ecef !important;
  /* !important維持 (JSからの制御を優先) */
  color: #adb5bd !important;
  /* !important維持 */
  cursor: not-allowed !important;
  /* !important維持 */
  border-color: #dee2e6 !important;
  /* !important維持 */
  opacity: 0.7 !important;
  /* !important維持 */
}

.btn-control:disabled:hover,
.btn-control[disabled]:hover {
  background-color: #e9ecef !important;
  /* !important維持 */
  border-color: #dee2e6 !important;
  /* !important維持 */
  color: #adb5bd !important;
  /* !important維持 */
}

/* --- 時間枠スタイルの変更 --- */

.time-slots {
  display: grid;
  gap: 15px;
}

/* モバイル専用: 時間枠間のギャップを縮小 */
@media (max-width: 768px) {
  .time-slots {
    gap: 10px;
    /* モバイルで時間枠間のギャップを縮小 */
  }
}

.time-slot {
  display: grid;
  grid-template-columns: 1fr auto auto;
  /* 時間 | ステータス | ボタンor満席表示 */
  align-items: center;
  background-color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #eee;
  transition: box-shadow 0.2s ease-in-out;
  scroll-margin-bottom: 180px;
  /* ★ 50px分の余白を確保 (この値を調整) */
}

.time-slot:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.time {
  font-weight: bold;
  font-size: 1.1em;
  color: #555;
}

/* --- 新しいステータスラベルのスタイル --- */
.availability-label {
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.9em;
  text-align: center;
  min-width: 90px;
  justify-self: center;
}

.availability-label.status-available {
  background-color: #e8f5e9;
  color: #388e3c;
}

.availability-label.status-few-seats {
  background-color: #fff3e0;
  color: #f57c00;
}

.availability-label.status-full {
  background-color: #ffebee;
  color: #d32f2f;
}

/* --- ボタンと満席表示のスタイル調整 --- */
.reserve-btn {
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
  justify-self: end;
  font-weight: bold;
  min-height: 44px;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reserve-btn.status-available {
  background-color: #4caf50;
}

.reserve-btn.status-available:hover {
  background-color: #388e3c;
}

.reserve-btn.status-few-seats {
  background-color: #ffa726;
}

.reserve-btn.status-few-seats:hover {
  background-color: #f57c00;
}

.full-notice {
  color: #aaa;
  font-weight: bold;
  font-size: 14px;
  padding: 8px 15px;
  justify-self: end;
  text-align: center;
}

/* 予約フォーム */
.reservation-form {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-top: 30px;
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
  color: var(--color-text-light);
  font-size: var(--font-size-base);
}

input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
  font-family: inherit;
  background-color: var(--color-bg-white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

/* インラインスタイルを削除したemail入力欄のスタイル */
input[type="email"] {
  box-sizing: border-box;
  /* width: 100% と padding を両立させるため */
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
  border: none;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--font-size-base);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--color-bg-light);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--font-size-base);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--color-border-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* フッター */
footer {
  background-color: #333;
  color: #fff;
  padding: 20px 0;
  text-align: center;
}

/* ローディングインジケーター */
.loading {
  text-align: center;
  padding: 20px;
}

/* CSSカスタムプロパティを定義（必要なら :root で）*/
:root {
  --primary-color: #4caf50;
  /* 例: 緑色 */
  --primary-light: #e8f5e9;
  /* 例: 薄い緑色 */
}

.loading::after {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  margin: 10px auto;
  border-radius: 50%;
  border: 3px solid var(--primary-light);
  /* カスタムプロパティ使用 */
  border-top-color: var(--primary-color);
  /* カスタムプロパティ使用 */
  animation: spin 1s linear infinite;
}

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

/* エラーメッセージ */
.error {
  color: #d32f2f;
  /* 赤色 */
  text-align: center;
  padding: 20px;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
  margin: 15px 0;
}

/* 定休日メッセージのスタイル */
.closed-notice {
  padding: 20px;
  margin: 15px 0 180px 0;
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  border-radius: 8px;
  text-align: center;
  font-weight: bold;
}

/* 満席時のラベル色をより明確に (time-slot にクラス付与する場合) */
/* 上記 .availability-label.status-full で対応済み */

/* --- 導入セクションのスタイル調整 --- */
.intro {
  background-color: #fdfaf6;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 30px;
  border: 1px solid #eee;
}

.intro h2 {
  margin-bottom: 25px;
}

.intro p {
  font-size: 15.5px;
  line-height: 1.8;
  margin-bottom: 1.1em;
  color: #555;
}

/* 最初の文のスタイル (不要なら削除) */

.intro h3.intro-heading {
  font-size: 1.14em;
  margin-top: 28px;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #a6d7ae;
  color: #388e3c;
}

.intro p.intro-final-sentence {
  margin-top: 25px;
  font-weight: 600;
  font-size: 15px;
  color: #333;
}

.intro p:last-child {
  margin-bottom: 0;
}

/* メインメッセージのスタイル */
.intro-main-message {
  font-weight: 600;
  font-size: 16px;
  color: #333;
  margin-bottom: 20px;
}

/* アコーディオンのスタイル */
.accordion {
  margin-top: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.accordion-toggle {
  width: 100%;
  padding: 12px 16px;
  background-color: #f8f9fa;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  transition: background-color 0.2s ease;
}

.accordion-toggle:hover {
  background-color: #e9ecef;
}

.accordion-toggle[aria-expanded="true"] {
  background-color: #e9ecef;
}

.accordion-toggle[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}

.accordion-icon {
  font-size: 12px;
  transition: transform 0.2s ease;
  color: #666;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-content.open {
  max-height: 300px;
}

.accordion-body {
  padding: 16px;
  background-color: #ffffff;
}

.accordion-body h4 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 14px;
  color: #388e3c;
}

.accordion-body p {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 10px;
  color: #555;
}

.accordion-body p:last-child {
  margin-bottom: 0;
}

/* --- 予約確認モーダルのスタイル --- */
/* JSでクラスを着脱するためのクラスを追加 */
.hidden {
  display: none;
}

.modal {
  /* display: none; は .hidden クラスで制御 */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 30px;
  border: 1px solid #ddd;
  border-radius: 8px;
  width: 80%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  animation: slideIn 0.3s ease-out;
}

.close-modal-btn {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
}

.close-modal-btn:hover,
.close-modal-btn:focus {
  color: #333;
  text-decoration: none;
  cursor: pointer;
}

.modal h2 {
  margin-top: 0;
  margin-bottom: 25px;
  color: #333;
  text-align: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

#confirmation-details p {
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.6;
}

#confirmation-details p strong {
  display: inline-block;
  width: 130px;
  color: #555;
}

#confirmation-details span {
  font-weight: normal;
  color: #333;
}

#confirm-notes:empty::before {
  content: "(入力なし)";
  color: #aaa;
  font-style: italic;
}

.confirmation-message {
  margin-top: 30px;
  margin-bottom: 20px;
  font-size: 15px;
  text-align: center;
  color: #666;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
  padding: 12px 25px;
  font-size: 16px;
}

/* 予約確認モーダルの改善 */
.confirmation-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 2px solid var(--color-primary-light);
}

.confirmation-header h2 {
  color: var(--color-primary-dark);
  font-size: var(--font-size-xl);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.datetime-confirmation {
  background-color: var(--color-primary-light);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

.datetime-confirmation h3 {
  color: var(--color-primary-dark);
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.datetime-display {
  background-color: white;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin: var(--spacing-md) 0;
  border: 1px solid var(--color-primary);
}

.datetime-display span {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.datetime-warning {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  margin: var(--spacing-md) 0;
  color: var(--color-warning);
  font-weight: 600;
  font-size: var(--font-size-base);
}

.datetime-warning i {
  color: var(--color-warning);
}

.change-notice {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--spacing-md);
  font-style: italic;
}

/* 入場時間の注意スタイル */
.entry-time-notice {
  background-color: #fffaeb;
  border: 1px solid #eab308;
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

.entry-time-notice h4 {
  color: var(--color-text);
  margin-bottom: var(--spacing-sm);
  font-size: var(--font-size-base);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  font-weight: 500;
}

.entry-time-notice h4 i {
  color: #ca8a04;
}

.entry-notice-text {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  margin: 0;
}

.entry-notice-text strong {
  color: var(--color-text);
  font-weight: 600;
}

/* スワイプヒントのスタイル */
.swipe-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-sm);
  background-color: var(--color-bg-light);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  opacity: 0.8;
}

.swipe-hint i {
  color: var(--color-primary);
  font-size: 16px;
}

/* スマホでのみ表示 */
@media (min-width: 768px) {
  .swipe-hint {
    display: none;
  }
}

.booking-details {
  background-color: var(--color-bg-light);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.booking-details h3 {
  color: var(--color-text);
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-lg);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--spacing-sm);
}

.modal-actions {
  flex-direction: column;
  gap: var(--spacing-sm);
}

.modal-actions button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

/* モバイル対応 */
@media (max-width: 768px) {
  .datetime-display span {
    font-size: 18px;
  }

  .confirmation-header h2 {
    font-size: var(--font-size-lg);
  }

  .datetime-confirmation,
  .booking-details {
    padding: var(--spacing-md);
  }
}

/* アニメーション */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===============================================
   Flatpickr 日付ステータス表示 (!important削除、順序変更版)
   =============================================== */

/* (必要なら) 空きありの日のスタイルを先に記述 */
/* .flatpickr-calendar .flatpickr-day.status-available { ... } */

/* ▼▼▼ Flatpickrのデフォルト選択色 (.selected) を先に記述 ▼▼▼ */
/* (他のカスタムスタイルで上書きされるベースとなるスタイル) */
.flatpickr-calendar .flatpickr-day.selected,
.flatpickr-calendar .flatpickr-day.startRange,
.flatpickr-calendar .flatpickr-day.endRange {
  background: #1bbc9b;
  /* material_green の選択色 */
  color: #fff;
  border-color: #1bbc9b;
  /* !important は付けない */
}

/* ▼▼▼ カスタムステータスのスタイルを後に記述して上書き ▼▼▼ */

/* 残りわずかな日 (定休日でも満席でもない) */
.flatpickr-calendar .flatpickr-day.status-few-seats:not(.holiday-date):not(.status-full),
.flatpickr-calendar .flatpickr-day.status-few-seats:not(.holiday-date):not(.status-full):hover,
.flatpickr-calendar .flatpickr-day.selected.status-few-seats:not(.holiday-date):not(.status-full),
/* selected + few_seats */
.flatpickr-calendar .flatpickr-day.selected.status-few-seats:not(.holiday-date):not(.status-full):hover {
  background: #fff3e0;
  /* .selected の背景を上書き */
  border-color: #ffe0b2;
  /* .selected の境界線を上書き */
  color: #8d6e63;
  /* .selected の文字色を上書き */
  /* cursor はデフォルト (pointer) */
}

/* 満席の日 (定休日以外) */
.flatpickr-calendar .flatpickr-day.status-full:not(.holiday-date),
.flatpickr-calendar .flatpickr-day.status-full:not(.holiday-date):hover,
.flatpickr-calendar .flatpickr-day.selected.status-full:not(.holiday-date),
/* selected + full */
.flatpickr-calendar .flatpickr-day.selected.status-full:not(.holiday-date):hover {
  background: #ffebee;
  /* .selected の背景を上書き */
  color: #e57373;
  /* .selected の文字色を上書き */
  border-color: #ffcdd2;
  /* .selected の境界線を上書き */
  cursor: not-allowed;
  /* クリックできないカーソル */
}

/* 定休日のスタイル (最も優先したい場合が多いので最後に記述) */
.flatpickr-calendar .flatpickr-day.holiday-date,
.flatpickr-calendar .flatpickr-day.holiday-date:hover,
.flatpickr-calendar .flatpickr-day.selected.holiday-date,
/* selected + holiday */
.flatpickr-calendar .flatpickr-day.selected.holiday-date:hover {
  background: #f0f0f0;
  /* .selected の背景を上書き */
  color: #aaa;
  /* .selected の文字色を上書き */
  cursor: not-allowed;
  /* クリックできないカーソル */
  border-color: #f0f0f0;
  /* .selected の境界線を上書き */
}

/* ===============================================
   レスポンシブデザイン (768px以下で適用)
   =============================================== */
@media (max-width: 768px) {
  /* 基本フォントサイズの調整 */
  body {
    font-size: 16px;
    line-height: 1.7;
  }

  /* ヘッダーの調整 */
  header h1 {
    font-size: 1.8em;
  }

  header p.subtitle {
    font-size: 1em;
  }

  /* 日付選択エリアの改善 */
  .date-controls {
    gap: 12px;
    justify-content: center;
  }

  .date-input {
    font-size: 16px;
    padding: 12px 14px;
    width: 160px;
    text-align: center;
  }

  /* モバイルでの日付入力欄 - カレンダーアイコン用の右パディング */
  #selected-date.date-input {
    padding-right: 48px !important;
    /* モバイルでカレンダーアイコンのスペースを確保 */
  }

  /* 時間枠のレスポンシブ - コンパクト化（ステータスとボタンを横並び） */
  .time-slot {
    grid-template-columns: 1fr 1fr;
    /* 2列にしてステータスとボタンを横並び */
    grid-template-rows: auto auto;
    /* 2行に変更（時間、ステータス+ボタン） */
    gap: 6px 15px;
    /* 縦ギャップをさらに小さく、横ギャップを中央寄せ用に調整 */
    text-align: center;
    /* 全体を中央寄せに */
    scroll-margin-bottom: 180px;
    /* ★ 50px分の余白を確保 (この値を調整) */
    padding: 10px 16px;
    /* パディングをさらにコンパクトに */
  }

  .time {
    grid-column: 1 / -1;
    /* 時間は全幅に配置 */
    grid-row: 1;
    margin-bottom: 0;
    /* マージンを削除（ギャップで調整） */
    font-size: 1.2em;
    /* フォントサイズを少し小さく */
    font-weight: bold;
  }

  .availability-label {
    grid-row: 2;
    grid-column: 1;
    justify-self: end;
    /* ステータスラベルを右寄せ（中央寄せのため） */
    align-self: center;
    /* 垂直方向中央 */
    margin-bottom: 0;
    /* マージンを削除（ギャップで調整） */
  }

  .reserve-btn,
  .full-notice {
    grid-row: 2;
    grid-column: 2;
    justify-self: start;
    /* ボタン/満席表示を左寄せ（中央寄せのため） */
    align-self: center;
    /* 垂直方向中央 */
    width: auto;
    /* 幅を自動調整 */
    min-width: 100px;
    /* 最小幅を設定 */
    max-width: 140px;
    /* 最大幅を設定 */
    min-height: 40px;
    /* 高さをさらにコンパクトに */
    font-size: 14px;
    /* フォントサイズをさらに小さく */
    padding: 8px 12px;
    /* パディングを調整 */
  }

  /* モーダルのレスポンシブ */
  .modal-content {
    width: 90%;
    margin: 15% auto;
    padding: 20px;
  }

  #confirmation-details p strong {
    display: block;
    /* ラベルをブロック要素に */
    width: auto;
    margin-bottom: 3px;
  }

  .modal-actions {
    flex-direction: column;
    /* ボタンを縦積みに */
    align-items: center;
  }

  .modal-actions button {
    width: 80%;
    /* ボタン幅 */
    min-height: 48px;
    font-size: 17px;
  }

  /* フォーム要素の改善 */
  input[type="text"],
  input[type="tel"],
  input[type="email"],
  select,
  textarea {
    font-size: 18px;
    padding: 8px 10px;
    border-radius: 6px;
    min-height: 44px;
  }

  .form-group {
    margin-bottom: 20px;
  }

  label {
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: bold;
  }

  /* モバイル専用の改善 */
  .container {
    padding: 0 20px;
  }

  .intro {
    padding: 20px;
    margin-bottom: 25px;
  }

  .intro p {
    font-size: 16px;
    line-height: 1.8;
  }

  /* カレンダーアイコンをモバイルで調整 */
  .calendar-icon {
    font-size: 18px;
    width: 38px;
    height: 38px;
    right: 8px;
    /* モバイルで少し大きめのタッチエリア */
  }

  /* 前日/翌日ボタンをモバイルで最適化 */
  .btn-control {
    padding: 12px 12px;
    font-size: 13px;
    min-width: 50px;
  }

  /* ステータスラベルの改善 - 横並び用にコンパクト化 */
  .availability-label {
    padding: 6px 12px;
    font-size: 14px;
    min-width: 80px;
    max-width: 120px;
    white-space: nowrap;
    /* テキストの改行を防ぐ */
  }

  /* 日付入力フィールドのフォント強化 */
  .date-input {
    font-weight: 550;
    font-size: 13px;
    color: #666;
  }

  /* 予約状況見出しのフォント強化 */
  #availability-heading {
    font-weight: 700;
    font-size: 18px;
  }

  #display-date {
    font-weight: 600;
  }

  /* 旧レスポンシブコードは上記に統合、または削除 */
  /*
  .dots,
  .status,
  .time {
    justify-self: center;
  }
  .reserve-btn,
  .full-notice {
    grid-column: 1;
    justify-self: center;
  }
  */
}

/* styles.css に追加 */

.price-display {
  margin-top: 20px;
  /* 上の要素との間隔 */
  padding: 15px;
  background-color: #f8f9fa;
  /* 少し背景色をつける (任意) */
  border-radius: 4px;
  border: 1px solid #eee;
}

.price-display label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #555;
}

.price-display .price-value {
  font-size: 1.4em;
  /* 料金を少し大きく表示 */
  font-weight: bold;
  color: #2e7d32;
}

/* styles.css (既存の .cancel-policy スタイルをベースに修正・追加) */

.cancel-policy {
  /* または .contact-info などHTMLで変更したクラス名 */
  margin-top: 30px;
  padding: 20px;
  background-color: #e7f5ff;
  /* 少し落ち着いた情報を示す薄い青系の背景 */
  border: 1px solid #b3e0ff;
  /* 対応する青系の境界線 */
  border-radius: 8px;
}

.cancel-policy h4 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #0056b3;
  /* 背景色に合わせた濃い青系の文字色 */
  text-align: center;
  border-bottom: 1px dotted #0056b3;
  /* 区切り線 (任意) */
  padding-bottom: 10px;
}

.cancel-policy p {
  font-size: 14px;
  line-height: 1.7;
  color: #333;
  /* 本文の文字色 */
  margin-bottom: 10px;
}

.cancel-policy p:last-child {
  margin-bottom: 0;
  /* 通常の段落には適用 */
}

/* 連絡先部分のスタイル */
.contact-methods {
  margin-top: 15px;
  /* 上の文章との間隔 */
  padding-top: 15px;
  /* 区切り線からの間隔 (任意) */
  border-top: 1px solid #b3e0ff;
  /* 上に区切り線を追加 (任意) */
}

.contact-methods p {
  margin-bottom: 8px;
  /* 連絡先間のスペース */
}

.contact-methods p:last-child {
  margin-bottom: 0;
  /* 最後の連絡先の下マージンは不要 */
}

.contact-methods strong {
  color: #333;
  /* ラベルの色 (例: 本文と同じ) */
  font-weight: bold;
  display: inline-block;
  /* アイコンとの位置調整のため (任意) */
  min-width: 100px;
  /* ラベル幅を揃える (任意) */
}

/* アイコンのスタイル (Font Awesomeを使用する場合) */
.contact-methods i {
  margin-right: 8px;
  /* アイコンとテキストの間隔 */
  color: #007bff;
  /* アイコンの色 (任意) */
  width: 1.2em;
  /* アイコンの幅を少し確保 (任意) */
  text-align: center;
  /* アイコンを中央揃え (任意) */
}

/* エラーとローディング状態 */
.loading {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 16px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
  margin: 20px 0;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.error {
  background-color: #ffebee;
  border: 1px solid #f44336;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
  color: #c62828;
}

.error small {
  display: block;
  margin-top: 10px;
  color: #666;
  font-size: 12px;
  opacity: 0.8;
}

.retry-btn {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-top: 15px;
  transition: background-color 0.3s ease;
  min-height: 44px;
}

.retry-btn:hover {
  background-color: #45a049;
}

.network-status {
  position: fixed;
  top: 10px;
  right: 10px;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 1000;
  transition: all 0.3s ease;
  display: none;
}

.network-status.show {
  display: block;
}

.network-status.online {
  background-color: #4caf50;
  color: white;
}

.network-status.offline {
  background-color: #f44336;
  color: white;
}

.form-validation-error {
  color: #d32f2f;
  font-size: 14px;
  margin-top: 5px;
  display: none;
}

.form-group.error input,
.form-group.error select {
  border-color: #d32f2f;
  background-color: #ffebee;
}

.success-message {
  background-color: #e8f5e9;
  border: 1px solid #4caf50;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
  color: #2e7d32;
}

/* 選択時間表示 */
.selected-time-display {
  background-color: var(--color-primary-light);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-weight: 500;
  color: var(--color-primary-dark);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.selected-time-display:hover {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.selected-time-display:hover i {
  color: white;
}

.selected-time-display i {
  color: var(--color-primary);
  font-size: var(--font-size-lg);
}

/* 選択された時間枠のハイライト */
.time-slot.selected {
  background-color: var(--color-primary-light);
  border: 2px solid var(--color-primary);
  box-shadow: var(--shadow-md);
}

/* アクセシビリティ関連のスタイル */
.required {
  color: #d32f2f;
  font-weight: bold;
  margin-left: 4px;
}

.field-help {
  font-size: 14px;
  color: #666;
  margin-top: 5px;
  line-height: 1.4;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* フォーカス表示の改善 */
button:focus,
input:focus,
select:focus,
textarea:focus,
.btn-control:focus,
.accordion-toggle:focus {
  outline: 2px solid #4caf50;
  outline-offset: 2px;
}

/* ハイコントラストモード対応 */
@media (prefers-contrast: high) {
  .error {
    border-width: 2px;
  }

  .required {
    font-weight: 900;
  }

  button:focus,
  input:focus,
  select:focus,
  textarea:focus {
    outline-width: 3px;
  }
}

.contact-methods i.fa-instagram {
  color: #c13584;
  /* Instagramのブランドカラーっぽく (任意) */
}

/* リンクのスタイル */
.contact-methods a {
  color: #007bff;
  /* 標準的なリンク色 */
  text-decoration: none;
}

.contact-methods a:hover {
  text-decoration: underline;
}

/* === CSSファイルの下部あたりに追加 === */

/* 日付入力とアイコンのラッパー */
.date-input-wrapper {
  position: relative;
  /* アイコンの位置決めの基準 */
  display: inline-block;
  /* 他のコントロールと並べるため */
  vertical-align: middle;
  /* 隣のボタンとの垂直位置を揃える (任意) */
}

/* カレンダーアイコンのスタイル */
.calendar-icon {
  position: absolute;
  right: 10px;
  /* 入力欄内の右端から10px */
  top: 50%;
  transform: translateY(-50%);
  /* 上下中央揃え */
  color: #4caf50;
  /* テーマカラーで目立たせる */
  cursor: pointer;
  /* クリック可能なカーソル */
  font-size: 16px;
  /* 固定フォントサイズ */
  transition: all 0.2s ease;
  /* ホバー効果用 */
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background-color: rgba(76, 175, 80, 0.1);
  /* 薄い緑の背景 */
  border: 1px solid rgba(76, 175, 80, 0.2);
  /* 薄い緑の境界線 */
  line-height: 1;
  /* ラインハイトをリセット */
  text-align: center;
  /* テキスト中央揃え */
  vertical-align: middle;
  /* 垂直方向の中央揃え */
}

/* Font Awesomeアイコンの中央配置を強制 */
.calendar-icon::before {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.calendar-icon:hover {
  color: #388e3c;
  /* ホバー時により濃い緑色 */
  background-color: rgba(76, 175, 80, 0.2);
  /* ホバー時に背景を少し濃く */
  border-color: rgba(76, 175, 80, 0.4);
  /* ホバー時に境界線を濃く */
  transform: translateY(-50%) scale(1.05);
  /* 少し拡大してインタラクティブ感を演出 */
}

/* 日付入力欄のスタイル - カレンダーアイコン用の右パディング */
#selected-date.date-input {
  padding-right: 50px !important;
  /* カレンダーアイコンのスペースを確保 */
}

/* Flatpickrのデフォルトアイコンを非表示にする場合 (任意) */
/* .flatpickr-input::after { display: none; } */

/* === CSS追加ここまで === */

/* 既存の .flatpickr-input の padding-right を削除またはコメントアウト (もしあれば) */
/*
.flatpickr-input {
  padding-right: 30px !important;
}
*/

/* #email の個別スタイルを削除 - 共通のinputスタイルを使用 */

/* 予約状況の日付見出しを初期状態で非表示にする */
#display-date {
  display: none;
}

/* --- 予約状況サマリー表示 (スマホ向け) --- */

/* デフォルトでは非表示 */
.time-status-summary {
  display: none;
  justify-content: center;
  /* 中央揃え */
  align-items: center;
  /* 垂直中央揃え */
  flex-wrap: wrap;
  /* 必要なら折り返し */
  gap: 8px;
  /* ドット間の隙間 */
  margin-bottom: 20px;
  /* 下のリストとの間隔 */
  padding: 10px 0;
  /* 上下の余白 (任意) */
  /* background-color: #f0f0f0; /* 背景色をつけても良い (任意) */
  /* border-radius: 4px;        /* 角丸 (任意) */
}

/* ステータスドットの基本スタイル */
.status-dot {
  width: 28px;
  /* 少し幅を広げる (例) */
  height: 28px;
  /* 少し高さを広げる (例) */
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 10px;
  /* 文字サイズを少し小さくする (例) */
  font-weight: bold;
  color: rgba(0, 0, 0, 0.7);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  /* 他のスタイルは維持 */
  cursor: pointer;
  /* ★ クリック可能を示すカーソル */
  user-select: none;
  /* ★ テキスト選択を防ぐ (任意) */
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  /* クリック時のフィードバック (任意) */
}

/* ステータスごとの色 */
.status-dot.available {
  background-color: #a5d6a7;
  /* 緑系 (予約可能) */
  border: 1px solid #81c784;
}

.status-dot.few-seats {
  background-color: #ffe082;
  /* 黄色系 (残りわずか) */
  border: 1px solid #ffd54f;
}

.status-dot.full {
  background-color: #ef9a9a;
  /* 赤系 (満席) */
  border: 1px solid #e57373;
  color: rgba(0, 0, 0, 0.4);
  /* 満席時は時間を薄く (任意) */
}

/* --- レスポンシブ設定 (スマホ画面でのみサマリーを表示) --- */
@media (max-width: 768px) {
  /* スマホ画面ではサマリー表示を有効にする */
  .time-status-summary {
    display: flex;
    /* flex にして表示 */
  }

  /* (オプション) スマホでは元の縦長リストを少しシンプルにするなど調整可能 */
  /* 例: .time-slot { padding: 10px 15px; } */
}

/* --- ここまで追加 --- */
