:root {
  --bg: #f4f6f8;
  --text: #1f2933;
  --primary: #0d6efd;
  --card: #ffffff;
  --border: #d9e2ec;
}

body {
  background: linear-gradient(135deg, #f4f6f8 0%, #eef4fb 100%);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  min-height: 100vh;
}

.navbar-brand {
  font-weight: 700;
}

.header-logo-link {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.header-logo {
  display: block;
  height: 40px;
  width: auto;
}

.main-container {
  max-width: 1100px;
}

.card {
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.table td,
.table th {
  vertical-align: middle;
}

.status-badge {
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}

.status-reserved {
  background: #e6f4ea;
  color: #1e7e34;
}

.status-canceled {
  background: #fce8e6;
  color: #b3261e;
}

.status-done {
  background: #e8f0fe;
  color: #174ea6;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
}

.calendar-weekdays > div {
  text-align: center;
  font-size: 0.85rem;
  color: #66788a;
  font-weight: 700;
}

.calendar-cell {
  position: relative;
  min-height: 88px;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem;
  background: #fff;
  overflow: hidden;
}

.calendar-cell.is-out-month {
  background: #f8fafc;
}

.calendar-cell.is-clickable {
  box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.3);
}

.calendar-cell.is-holiday {
  background: #fff5f5;
  border-color: #f1b4b4;
}

.calendar-cell.is-holiday .calendar-day-number {
  color: #c53030;
}

.calendar-day-number {
  font-size: 0.95rem;
  font-weight: 700;
}

.calendar-count {
  margin-top: 0.35rem;
  font-size: 0.8rem;
}

.calendar-count.has-count {
  color: #0b5ed7;
  font-weight: 700;
}

.calendar-count.no-count {
  color: #8b9aab;
}

.calendar-count.is-holiday {
  color: #c53030;
  font-weight: 700;
}

.calendar-cell-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.slot-modal[hidden] {
  display: none !important;
}

.slot-modal {
  position: fixed;
  inset: 0;
  z-index: 1040;
}

.slot-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

.slot-modal-panel {
  position: relative;
  margin: 8vh auto 0;
  width: min(980px, calc(100% - 2rem));
  max-height: 84vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.slot-modal-panel .table th,
.slot-modal-panel .table td {
  white-space: nowrap;
  word-break: keep-all;
}

@media (max-width: 768px) {
  .table-responsive {
    font-size: 0.9rem;
  }

  #reserve-calendar-root .calendar-grid {
    gap: 0.3rem;
  }

  #reserve-calendar-root .calendar-cell {
    min-height: 0;
    padding: 0.35rem;
    border-radius: 0.4rem;
  }

  #reserve-calendar-root .calendar-day-number {
    font-size: 0.85rem;
    line-height: 1;
  }

  #reserve-calendar-root .calendar-count {
    margin-top: 0;
    font-size: 0;
    line-height: 1;
    align-self: flex-end;
    font-weight: 700;
  }

  #reserve-calendar-root .calendar-count::after {
    content: attr(data-mobile-label);
    font-size: 0.95rem;
  }

  #reserve-calendar-root .calendar-count.has-count::after {
    color: #0b5ed7;
  }

  #reserve-calendar-root .calendar-count.no-count::after {
    color: #dc3545;
  }

  #reserve-calendar-root .calendar-count.is-holiday::after {
    color: #dc3545;
  }
}
