/* --------------------------------------------------
  Reset & Variables
-------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-color: #b8935c;      /* 温かみのある真鍮ゴールド */
  --primary-hover: #9c7743;      /* 少し深みのあるゴールドブラウン */
  --secondary-color: #5c5246;    /* 木・レザーを思わせるグレーブラウン */
  --accent-color: #7b8e72;       /* 柔らかいアースグリーン（空き枠用） */
  --error-color: #c97a7a;        /* 落ち着いたローズレッド（満席用） */
  --bg-color: #FAF8F5;           /* 温かみのある生成り・アイボリー背景 */
  --card-bg: #ffffff;            /* 純白カード背景 */
  --card-border: #e6dfd3;        /* 薄いベージュの境界線 */
  --text-primary: #3c352d;       /* 墨色に近いダークブラウン */
  --text-secondary: #706557;     /* ミディアムブラウン */
  --text-muted: #a39687;         /* ソフトなブラウングレー */
  --font-main: 'Noto Sans JP', sans-serif;
  --font-logo: 'Outfit', sans-serif;
  --border-radius: 12px;         /* クラフト感のある少し角丸を抑えたスタイル */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
  position: relative;
}

/* --------------------------------------------------
  Background Glow Effects
-------------------------------------------------- */
.bg-glow {
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4; /* ライト背景に馴染むよう透明度を調整 */
  pointer-events: none;
  z-index: 0;
}

.bg-glow-1 {
  background: radial-gradient(circle, #f3ede2 0%, transparent 70%);
  top: -10%;
  left: -10%;
}

.bg-glow-2 {
  background: radial-gradient(circle, #e2ebd9 0%, transparent 70%);
  bottom: -10%;
  right: -10%;
}

/* --------------------------------------------------
  Container & Layout
-------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1024px;
  padding: 40px 20px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  text-align: center;
  margin-bottom: 40px;
}

.logo {
  font-family: var(--font-logo);
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 5px;
}

.subtitle {
  font-family: var(--font-logo);
  font-size: 0.9rem;
  letter-spacing: 0.4em;
  color: var(--primary-color);
  font-weight: 500;
  text-transform: uppercase;
}

/* --------------------------------------------------
  Main Reservation Card (Glassmorphism)
-------------------------------------------------- */
.main-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 30px;
}

/* --------------------------------------------------
  Progress Indicator
-------------------------------------------------- */
.progress-bar {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 40px;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f0eae1;
  border: 2px solid var(--card-border);
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-family: var(--font-logo);
  color: var(--text-secondary);
  transition: var(--transition);
  font-size: 0.95rem;
}

.step-label {
  font-size: 0.75rem;
  margin-top: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
}

.progress-step.active .step-num {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
}

.progress-step.active .step-label {
  color: var(--text-primary);
  font-weight: bold;
}

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

.progress-step.completed .step-label {
  color: var(--text-primary);
}

/* --------------------------------------------------
  Step Animation
-------------------------------------------------- */
.step-section {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

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

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

.section-title {
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 30px;
  text-align: center;
  color: var(--text-primary);
  position: relative;
}

/* --------------------------------------------------
  Buttons
-------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--border-radius);
  font-weight: bold;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.step-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  border-top: 1px solid var(--card-border);
  padding-top: 30px;
}

/* --------------------------------------------------
  Step 1: Plans Screen
-------------------------------------------------- */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 20px;
}

.plan-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.plan-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.plan-card.selected {
  border-color: var(--primary-color);
  background: rgba(99, 102, 241, 0.06);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
}

.plan-card.selected::before {
  content: '\f058';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 15px;
  right: 15px;
  color: var(--primary-color);
  font-size: 1.5rem;
  z-index: 2;
  background: var(--bg-color);
  border-radius: 50%;
}

.plan-image-wrapper {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.plan-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.plan-card:hover .plan-image {
  transform: scale(1.05);
}

.plan-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.plan-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.plan-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.plan-meta span i {
  color: var(--primary-color);
  margin-right: 5px;
}

.plan-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.plan-price-tag {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--text-primary);
  border-top: 1px solid var(--card-border);
  padding-top: 15px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.plan-price-tag span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: normal;
}

/* Plan Skeleton */
.plan-skeleton {
  height: 420px;
  background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 20px;
}

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

/* --------------------------------------------------
  Step 2: Date & Slots Selection
-------------------------------------------------- */
.step-2-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
}

@media (max-width: 868px) {
  .step-2-layout {
    grid-template-columns: 1fr;
  }
}

.selection-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.badge-required {
  font-size: 0.7rem;
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 5px;
  vertical-align: middle;
}

.form-select, .form-input {
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-select:focus, .form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(184, 147, 92, 0.25);
  background: #ffffff;
}

.form-select option {
  background: #ffffff;
  color: var(--text-primary);
}

.inquiry-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius);
  padding: 15px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.inquiry-box i {
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-top: 2px;
}

.inquiry-box a {
  color: #818cf8;
  text-decoration: underline;
  font-weight: bold;
}

.inquiry-box a:hover {
  color: #a5b4fc;
}

.selected-summary-box {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 20px;
}

.selected-summary-box h3 {
  font-size: 0.95rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 10px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.selected-summary-box p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Calendar styling */
.calendar-wrapper {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.calendar-title {
  font-size: 1.1rem;
  font-weight: bold;
}

.calendar-nav-btn {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--card-border);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
}

.calendar-nav-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 10px;
}

.day-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding-bottom: 10px;
}

.week-sun { color: #fca5a5; }
.week-sat { color: #93c5fd; }

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-day-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  position: relative;
  transition: var(--transition);
}

.calendar-day-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
}

.calendar-day-btn:disabled {
  color: var(--text-muted);
  opacity: 0.25;
  cursor: not-allowed;
}

.calendar-day-btn.today {
  border: 1.5px solid var(--primary-color);
}

.calendar-day-btn.selected {
  background: var(--primary-color) !important;
  color: white !important;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

/* Slots display styling */
.slots-container {
  margin-top: 30px;
  border-top: 1px solid var(--card-border);
  padding-top: 24px;
}

.slots-title {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 15px;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

@media (max-width: 500px) {
  .slots-grid {
    grid-template-columns: 1fr;
  }
}

.slot-btn {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 20px;
  color: var(--text-primary);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slot-btn.available:hover {
  border-color: var(--primary-color);
  background: rgba(184, 147, 92, 0.06);
  transform: translateY(-2px);
}

.slot-btn.selected {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(184, 147, 92, 0.3);
}

.slot-btn.booked {
  opacity: 0.5;
  background: #f3ede2;
  cursor: not-allowed;
  border-color: rgba(0, 0, 0, 0.02);
}

.slot-status {
  font-size: 0.75rem;
  font-weight: bold;
}

.slot-btn.available .slot-status {
  color: var(--accent-color);
}
.slot-btn.selected .slot-status {
  color: #fff;
}
.slot-btn.booked .slot-status {
  color: var(--error-color);
}

.slots-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 0;
  color: var(--text-secondary);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* --------------------------------------------------
  Step 3: User Details Form
-------------------------------------------------- */
.booking-form {
  max-width: 700px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .step-actions {
    flex-direction: column-reverse;
    gap: 15px;
  }
  .step-actions .btn {
    width: 100%;
  }
}

.checkout-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px;
  margin-top: 40px;
  margin-bottom: 20px;
}

.checkout-card h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 10px;
}

.checkout-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkout-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.checkout-row span {
  color: var(--text-secondary);
}

.total-row {
  font-size: 1.2rem;
  border-top: 1px dashed var(--card-border);
  padding-top: 15px;
  margin-top: 5px;
}

.total-row strong {
  color: #fff;
}

.checkout-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 15px;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.checkout-note i {
  color: #f59e0b;
  margin-top: 2px;
}

/* Loading Overlay for submit */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.loader-content {
  text-align: center;
  color: var(--text-primary);
}

.spinner-large {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

/* --------------------------------------------------
  Step 4: Success Screen
-------------------------------------------------- */
.success-screen {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 0;
}

.success-icon {
  font-size: 4.5rem;
  color: var(--accent-color);
  margin-bottom: 20px;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.success-title {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: white;
}

.success-message {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 30px;
}

.success-summary {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px;
  text-align: left;
  margin-bottom: 40px;
}

.success-summary h3 {
  font-size: 1rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.success-summary p {
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.success-summary p strong {
  color: white;
}

.success-actions {
  display: flex;
  justify-content: center;
}

/* --------------------------------------------------
  Footer
-------------------------------------------------- */
.footer {
  text-align: center;
  padding: 20px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  margin-top: auto;
}
