:root {
  --color-navy: #1b2a45;
  --color-navy-light: #2d4066;
  --color-gold: #c6973f;
  --color-gold-light: #dcb668;
  --color-bg: #f7f2e6;
  --color-surface: #ffffff;
  --color-text: #232c3d;
  --color-text-muted: #6f6a5c;
  --color-border: #e7ddc5;
  --color-danger: #a34638;
  --color-success: #3d6a63;
  --font-serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(27, 42, 69, 0.07);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--color-navy);
  text-decoration: none;
}

/* Header */
.site-header {
  background: var(--color-navy);
  color: #fff;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
}

.brand {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand span {
  color: var(--color-gold-light);
  font-weight: 400;
  margin-left: 4px;
}

.site-nav {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.site-nav a {
  color: #e8e9ee;
  font-size: 0.95rem;
}

.site-nav a:hover {
  color: var(--color-gold-light);
}

.site-nav .btn-nav {
  background: var(--color-gold);
  color: var(--color-navy);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
}

.site-nav .btn-nav:hover {
  background: var(--color-gold-light);
  color: var(--color-navy);
}

/* Main */
.main-content {
  flex: 1;
  padding: 40px 20px 60px;
}

.page-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  margin: 0 0 8px;
  color: var(--color-navy);
}

.page-lead {
  color: var(--color-text-muted);
  margin: 0 0 32px;
}

/* Card */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 24px;
}

.card--narrow {
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

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

.time-range-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.time-range-row select {
  width: auto;
  flex: 1 1 0;
  min-width: 0;
}
.time-range-sep {
  flex: 0 0 auto;
  color: var(--color-text-muted);
  font-weight: 600;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.92rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  color: var(--color-text);
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(201, 154, 62, 0.18);
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

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

.btn-primary {
  background: var(--color-navy);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-navy-light);
}

.btn-secondary {
  background: transparent;
  color: var(--color-navy);
  border: 1px solid var(--color-border);
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.alert-error {
  background: #f8e9e4;
  color: var(--color-danger);
  border: 1px solid #edcfc4;
}

.alert-success {
  background: #e7f0ee;
  color: var(--color-success);
  border: 1px solid #c6dcd7;
}

/* Calendar */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

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

.calendar-grid .weekday {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  padding-bottom: 6px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--color-border);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.calendar-day:hover {
  border-color: var(--color-gold);
  box-shadow: 0 4px 10px rgba(22, 35, 61, 0.08);
  transform: translateY(-1px);
}

.calendar-day.is-empty {
  background: transparent;
  border: none;
  cursor: default;
}
.calendar-day.is-empty:hover {
  box-shadow: none;
  transform: none;
}

.calendar-day.is-past,
.calendar-day.is-closed {
  color: var(--color-text-muted);
  background: #efe8da;
  cursor: not-allowed;
}
.calendar-day.is-past:hover,
.calendar-day.is-closed:hover {
  border-color: var(--color-border);
  box-shadow: none;
  transform: none;
}

.calendar-day.is-today {
  border-color: var(--color-navy);
  border-width: 2px;
  font-weight: 700;
}

.calendar-day.is-selected {
  background: var(--color-navy);
  color: #fff;
  border-color: var(--color-navy);
}

.calendar-day.has-availability::after {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold);
  margin-top: 4px;
}

.calendar-day.few-remaining::after {
  background: var(--color-danger);
}

.calendar-day.phone-only-day::after {
  background: var(--color-success);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: 14px 2px 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.calendar-legend-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold);
}
.calendar-legend-dot--warn {
  background: var(--color-danger);
}
.calendar-legend-dot--phone {
  background: var(--color-success);
}

/* Weekly schedule (Gantt-style) view */
.schedule-wrap {
  overflow-x: auto;
}
.schedule-grid {
  min-width: 640px;
}
.schedule-header-row,
.schedule-row {
  display: flex;
  align-items: stretch;
}
.schedule-daylabel {
  flex: 0 0 92px;
  padding: 6px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-navy);
  display: flex;
  align-items: center;
}
.schedule-row.is-today .schedule-daylabel {
  color: var(--color-gold);
}
.schedule-row.is-past .schedule-daylabel {
  color: var(--color-text-muted);
  opacity: 0.45;
}
.schedule-row.is-past .schedule-track {
  background-color: rgba(35, 44, 61, 0.1);
}
.schedule-row.is-past .schedule-bar {
  opacity: 0.5;
}
.schedule-track {
  position: relative;
  flex: 1 1 auto;
  height: 46px;
  background-image: repeating-linear-gradient(
    to right,
    var(--color-border) 0,
    var(--color-border) 1px,
    transparent 1px,
    transparent calc(100% / 14)
  );
  border-bottom: 1px solid var(--color-border);
}
.schedule-row:last-child .schedule-track {
  border-bottom: none;
}
.schedule-track--header {
  height: 22px;
  background-image: none;
  border-bottom: none;
}
.schedule-hour-mark {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.schedule-bar {
  position: absolute;
  top: 5px;
  bottom: 5px;
  border-radius: 5px;
  background: var(--color-navy);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0 6px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  text-decoration: none;
  min-width: 4px;
}
.schedule-bar:hover {
  opacity: 0.85;
}
.schedule-bar--tour {
  background: var(--color-bg);
  border: 1.5px solid var(--color-gold);
  color: var(--color-navy);
}
.schedule-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.schedule-view-toggle {
  display: flex;
  gap: 8px;
  margin: 14px 0 18px;
}
.schedule-row--compact .schedule-track {
  height: 26px;
}
.schedule-row--compact .schedule-bar {
  top: 3px;
  bottom: 3px;
  font-size: 0.66rem;
  padding: 0 4px;
}
.schedule-row--compact .schedule-daylabel {
  font-size: 0.76rem;
  flex-basis: 76px;
}
@media (max-width: 600px) {
  .schedule-daylabel {
    flex: 0 0 66px;
    font-size: 0.76rem;
    padding: 6px 4px;
  }
  .schedule-row--compact .schedule-daylabel {
    flex-basis: 56px;
    font-size: 0.7rem;
  }
}

.first-time-notice {
  padding: 18px 20px;
  border-radius: 10px;
  background: #fdf8ec;
  border: 1px solid var(--color-gold-light);
  margin-bottom: 8px;
}

.booking-steps {
  display: flex;
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  max-width: 480px;
}
.booking-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}
.booking-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 13px;
  left: calc(50% + 20px);
  right: calc(-50% + 20px);
  height: 2px;
  background: var(--color-border);
}
.booking-step--done:not(:last-child)::after {
  background: var(--color-gold);
}
.booking-step-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.booking-step--current .booking-step-dot {
  border-color: var(--color-navy);
  background: var(--color-navy);
  color: #fff;
}
.booking-step--done .booking-step-dot {
  border-color: var(--color-gold);
  background: var(--color-gold);
  color: #fff;
}
.booking-step-label {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}
.booking-step--current .booking-step-label {
  color: var(--color-navy);
  font-weight: 600;
}
.booking-step--done .booking-step-label {
  color: var(--color-text);
}

@media (max-width: 480px) {
  .booking-step-label { font-size: 0.65rem; }
}

.conflict-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 10px;
  background: #f8e9e4;
  border: 2px solid var(--color-danger);
  color: var(--color-danger);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.6;
  animation: conflict-pop 0.25s ease-out;
}
.conflict-alert-icon {
  flex-shrink: 0;
  font-size: 1.2rem;
  line-height: 1.4;
}
@keyframes conflict-pop {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.phone-only-contact-actions {
  display: flex;
  gap: 10px;
}
.phone-only-contact-actions .btn {
  flex: 1;
}
.btn-line {
  background: #06c755;
  color: #fff;
}
.btn-line:hover {
  background: #05b34c;
  color: #fff;
}

@media (max-width: 480px) {
  .phone-only-contact-actions { flex-direction: column; }
}

.phone-only-day-notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #e7f0ee;
  color: var(--color-success);
  font-size: 0.88rem;
  font-weight: 600;
}

.slot-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  margin-top: 24px;
}

.slot-select-group {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--color-navy);
  box-shadow: var(--shadow);
}

.slot-select-label {
  display: block;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.slot-time-select {
  padding: 14px 16px;
  border-radius: 8px;
  border: 2px solid var(--color-gold);
  background: #fff;
  color: var(--color-text);
  font-size: 1.1rem;
  font-weight: 600;
  width: 100%;
  appearance: auto;
}

.slot-time-select:focus {
  outline: 3px solid var(--color-gold-light);
  outline-offset: 1px;
}

.btn-next {
  display: block;
  box-sizing: border-box;
  padding: 14px 24px;
  border-radius: 999px;
  border: none;
  background: var(--color-gold);
  color: var(--color-navy);
  font-weight: 700;
  font-size: 1.05rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  margin-top: 4px;
}

.btn-next:hover {
  background: var(--color-gold-light);
}

.slot-alt-divider {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  margin: 0;
}

.btn-full-day {
  padding: 9px 20px;
  background: transparent;
  color: var(--color-navy);
  font-weight: 500;
  font-size: 0.88rem;
  border: 1px solid var(--color-border);
  margin-top: 0;
}

.btn-full-day:hover {
  background: var(--color-bg);
}

.map-link {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-navy);
}
.map-link:hover {
  border-color: var(--color-gold);
  color: var(--color-navy);
}

.duration-card {
  background: #fdf8ec;
  border: 2px solid var(--color-gold);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.duration-label {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 10px;
}

.duration-select {
  width: 100%;
  font-size: 1.3rem;
  font-weight: 600;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-navy);
}

.duration-range-preview {
  margin: 12px 0 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-navy);
}

.duration-limit-note {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: #8a8272;
}

.duration-limit-note strong {
  color: var(--color-navy);
}

.phone-only-notice {
  width: 100%;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}

.phone-only-notice p {
  margin: 0 0 10px;
}

.btn-call {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--color-gold);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.btn-call-line {
  background: #06c755;
}
.phone-only-notice .phone-only-contact-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* Table (admin) */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.data-table th, .data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  font-size: 0.92rem;
}

.data-table th {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* お客様向けの予約内容サマリー(data-tableより余白広め・落ち着いた見た目) */
table.summary-list {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}
.summary-list tr { border-bottom: 1px solid var(--color-border); }
.summary-list tr:last-child { border-bottom: none; }
.summary-list th, .summary-list td {
  padding: 14px 4px;
  text-align: left;
  font-size: 0.95rem;
  border: none;
}
.summary-list th {
  width: 40%;
  color: var(--color-text-muted);
  font-weight: 500;
}
.summary-list td {
  font-weight: 600;
  color: var(--color-text);
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.status-badge.confirmed {
  background: #e7f0ee;
  color: var(--color-success);
}

.status-badge.cancelled {
  background: #efe8da;
  color: var(--color-text-muted);
}

.status-badge.tour {
  background: #fdf2df;
  color: #8a6a1f;
}

/* Footer */
.site-footer {
  padding: 24px 20px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.footer-links a {
  margin: 0 10px;
}

/* Utilities */
.text-muted { color: var(--color-text-muted); }
.mt-0 { margin-top: 0; }
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 600px) {
  .main-content { padding: 24px 16px 48px; }
  .card { padding: 20px; }
  .site-header__inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .site-nav { width: 100%; justify-content: space-between; }
  .calendar-nav { gap: 6px; }
  .calendar-nav .btn { padding: 8px 12px; font-size: 0.85rem; white-space: nowrap; }
  .calendar-nav strong { font-size: 0.95rem; }
}

/* 予約確認ポップアップ(見積り確認・キャンセル注意) */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(27, 42, 69, 0.55);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.active {
  display: flex;
}
.modal-box {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(27, 42, 69, 0.3);
  padding: 28px;
  max-width: 440px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  transform: scale(0.9);
  opacity: 0;
  animation: modal-pop 0.22s ease-out forwards;
}
@keyframes modal-pop {
  to { transform: scale(1); opacity: 1; }
}
.modal-title {
  font-family: var(--font-serif);
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-navy);
}
.modal-price {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--color-navy);
}
.modal-policy-lead {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.modal-policy-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0 16px;
  font-size: 0.95rem;
  line-height: 1.7;
  background: #f8e9e4;
  border: 1px solid #edcfc4;
  border-radius: 8px;
}
.modal-policy-list li {
  padding: 14px 0;
  border-bottom: 1px solid #edcfc4;
}
.modal-policy-list li:last-child {
  border-bottom: none;
}
.modal-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.modal-check-item input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--color-danger);
  cursor: pointer;
}
.modal-note {
  display: block;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 3px;
}

/* 注意喚起系のポップアップ(キャンセル注意事項など) */
.modal-box--warning {
  border-top: 5px solid var(--color-danger);
}
.modal-box--warning .modal-title {
  color: var(--color-danger);
}
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.modal-actions .btn { flex: 1; }

@media (max-width: 600px) {
  .modal-box { padding: 22px; }
  .modal-actions { flex-direction: column-reverse; }
}

/* トップページ(ようこそ) */
.welcome-card {
  text-align: center;
  padding: 44px 28px 48px;
  background: linear-gradient(180deg, #fdf9ef 0%, var(--color-surface) 55%);
}
.welcome-illustration {
  width: 180px;
  height: auto;
  margin: 0 auto 8px;
  display: block;
}

@media (max-width: 600px) {
  .welcome-illustration { width: 140px; }
}

/* 予約確認画面の有料オプション */
.option-row { margin: 10px 0; }
.option-qty-label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.option-qty-input {
  width: 60px;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 1rem;
  text-align: center;
}
