@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@400;500;600;700&family=Noto+Sans+JP:wght@300;400;500;600&display=swap');

/* ==========================================================================
   Reservation Form — Elegant Beige & Gold Theme
   ========================================================================== */

:root {
  --color-bg: #FBF7F1;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F3EAE0;
  --color-primary: #6B4A3A;
  --color-primary-dark: #4A3226;
  --color-accent: #BB9457;
  --color-accent-light: #E8D9BE;
  --color-accent-soft: #F6EEE1;
  --color-text: #3E2E24;
  --color-text-muted: #8A7565;
  --color-border: #E4D8C8;
  --color-danger: #B4694A;
  --color-disabled: #D8CFC3;

  --font-display: 'Shippori Mincho', serif;
  --font-body: 'Noto Sans JP', sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-card: 0 4px 24px rgba(74, 50, 38, 0.08);
  --shadow-hover: 0 8px 28px rgba(74, 50, 38, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   Page wrapper
   ========================================================================== */

.reservation-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.reservation-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 36px 32px;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .reservation-page {
    padding: 20px 12px 48px;
  }
  .reservation-card {
    padding: 24px 18px;
    border-radius: var(--radius-md);
  }
}

/* ==========================================================================
   Title / heading
   ========================================================================== */

.title {
  text-align: center;
  margin: 8px 0 28px;
}

.title h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: 0.08em;
  color: var(--color-primary-dark);
  margin: 0 0 6px;
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}

.title h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 2px;
  background: var(--color-accent);
}

/* ==========================================================================
   LINE footer image link
   ========================================================================== */

.footer_line {
  max-width: 260px;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.footer_line:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* ==========================================================================
   Step Progress — signature element
   A slim gold line with numbered circular markers.
   ========================================================================== */

.progress-container {
  max-width: 640px;
  margin: 12px auto 36px;
  padding: 0 8px;
}

.progress-bar {
  display: none; /* superseded by the stepper's own connecting line */
}

.reservation_steps {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  list-style: none;
  position: relative;
  margin: 0;
  padding: 0;
}

.reservation_steps::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 6%;
  right: 6%;
  height: 1px;
  background: var(--color-border);
  z-index: 0;
}

.reservation_step {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.reservation_step::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.reservation_steps {
  counter-reset: step-counter;
}

.reservation_step.active {
  color: var(--color-primary-dark);
  font-weight: 600;
}

.reservation_step.active::before {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  box-shadow: 0 0 0 4px var(--color-accent-soft);
}

/* ==========================================================================
   Messages (flash / validation)
   ========================================================================== */

.message,
.alert {
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent-light);
  color: var(--color-primary-dark);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin: 0 0 20px;
  font-size: 14px;
}

.error,
.errors,
.alert-danger {
  background: #FBEEE9;
  border: 1px solid #E7C4B4;
  color: var(--color-danger);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin: 0 0 20px;
  font-size: 14px;
}

/* ==========================================================================
   Tables — product / schedule / confirm
   ========================================================================== */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 28px;
}

.select_product_table {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.select_product_table thead th {
  background: var(--color-surface-alt);
  color: var(--color-primary-dark);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}

.select_product_table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
  color: var(--color-text);
}

.select_product_table tbody tr:last-child td {
  border-bottom: none;
}

.select_product_table tbody tr:hover td {
  background: var(--color-accent-soft);
}

.select_product_table tbody tr.bold td,
.select_product_table tbody tr:has(strong) td {
  background: var(--color-surface-alt);
}

/* checkbox rows — clickable label styling */
.select_product_table td label,
.select_product_table td input[type="checkbox"] {
  cursor: pointer;
}

.select_product_table input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--color-border);
  border-radius: 4px;
  margin-right: 10px;
  vertical-align: middle;
  position: relative;
  top: -1px;
  transition: all 0.2s ease;
}

.select_product_table input[type="checkbox"]:checked {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.select_product_table input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ==========================================================================
   Schedule table (calendar grid)
   ========================================================================== */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 8px;
}

.select_schedule_table {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 13px;
  min-width: 480px;
}

.select_schedule_table th,
.select_schedule_table td {
  text-align: center;
  padding: 10px 6px;
  border: 1px solid var(--color-border);
}

.select_schedule_table thead th {
  background: var(--color-surface-alt);
  color: var(--color-primary-dark);
  font-family: var(--font-display);
  font-weight: 600;
}

.select_schedule_table tbody th,
.select_schedule_table tbody td:first-child {
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.ok_button {
  background: none;
  /* border: 1.5px solid var(--color-accent); */
  color: var(--color-accent);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ok_button:hover {
  background: var(--color-accent);
  color: #fff;
  transform: scale(1.08);
}

/* the ✕ text sits in a plain td, dim it */
.select_schedule_table td {
  color: var(--color-disabled);
}
.select_schedule_table td:has(button) {
  color: inherit;
}

/* ==========================================================================
   Profile form area
   ========================================================================== */

.profile_area {
  margin: 0 0 28px;
}

.profile_area .flex {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.profile_area .flex:last-child {
  margin-bottom: 0;
}

.width30 {
  flex: 0 0 30%;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary-dark);
}

.width70 {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.width70:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
  background: var(--color-surface);
}

.required-style {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  background: var(--color-accent);
  border-radius: 3px;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

@media (max-width: 560px) {
  .profile_area .flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .width30,
  .width70 {
    flex: 1 1 100%;
    width: 100%;
  }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.button,
.back_button {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 13px 36px;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  display: inline-block;
  text-decoration: none;
}

.button {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(74, 50, 38, 0.2);
}

.button:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 6px 18px rgba(74, 50, 38, 0.28);
  transform: translateY(-1px);
}

.button:disabled {
  background: var(--color-disabled);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.back_button {
  background: transparent;
  color: var(--color-text-muted);
  border: 1.5px solid var(--color-border);
}

.back_button:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
  background: var(--color-surface-alt);
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* week navigation row on schedule page */
.select_schedule_table + script,
form p.flex {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}

/* ==========================================================================
   Utility
   ========================================================================== */

.text-center {
  text-align: center;
}

.margin_bottom {
  margin-bottom: 24px;
}

.bold,
tr.bold td {
  font-weight: 600;
  color: var(--color-primary-dark);
}

/* completion page links */
.reservation-card a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent-light);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.reservation-card a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.reservation-card a[href="/sheet_login"] {
  display: inline-block;
  margin: 4px 0 20px;
  padding: 12px 32px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  border-bottom: none;
}

.reservation-card a[href="/sheet_login"]:hover {
  background: var(--color-primary-dark);
  color: #fff;
}
