
:root {
  --off-white: #faf9f7;
  --charcoal: #2d2d2d;
  --charcoal-dark: #1a1a1a;
  --accent: #b8866b;
  --accent-light: #d4a98a;
  --text-secondary: #6b6560;
  --text-light: #9a928a;
  --transition: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --open-orange: #e8a04c;
  --open-orange-light: #f0be7a;
  --open-blue: #5a8ab5;
  --closed-gray: #b0a898;
}

/* ===== Page Content ===== */
.section { max-width: 960px; margin: 0 auto; padding: 40px 20px; }
.section h2 { font-size: 1.2rem; font-weight: 500; color: var(--charcoal); margin-bottom: 24px; padding-bottom: 8px; border-bottom: 1px solid var(--accent); letter-spacing: 0.04em; }

/* Legend */
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; font-size: .82rem; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }
.legend-dot.orange { background: var(--open-orange); }
.legend-dot.orange-light { background: var(--open-orange-light); }
.legend-dot.blue { background: var(--open-blue); }
.legend-dot.gray { background: #d5d0c8; }

/* Calendar Grid */
.calendar-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; background: #e8e3db; border-radius: 8px; overflow: visible; border: 1px solid #e8e3db; min-width: 500px; }

.day-header {
  background: var(--charcoal-dark);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 10px 4px;
  font-size: .85rem;
  letter-spacing: .1em;
  font-weight: normal;
}
.day-header.sun { color: #e88; }
.day-header.sat { color: #7ac; }

.day-cell {
  background: #fff;
  min-height: 100px;
  padding: 6px 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.day-cell:hover {
  z-index: 2;
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.day-cell.empty { background: var(--off-white); min-height: 40px; }
.day-cell.empty:hover { transform: none; box-shadow: none; }

.day-cell.closed {
  background: #f0eeea;
  color: var(--closed-gray);
}

.day-cell.today {
  outline: 3px solid var(--accent);
  outline-offset: -2px;
  background: #fffdf7;
}

.day-number {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 2px;
  line-height: 1.2;
}
.day-cell.sun .day-number { color: #c55; }
.day-cell.sat .day-number { color: #4a8ab5; }
.day-cell.closed .day-number { color: #a09888; }

.day-hours {
  font-size: .65rem;
  line-height: 1.3;
  margin-bottom: 3px;
  font-weight: 500;
  letter-spacing: .02em;
}
.day-hours.orange { color: var(--open-orange); }
.day-hours.orange-light { color: #c89840; }
.day-hours.blue { color: var(--open-blue); }
.day-hours.gray { color: var(--closed-gray); }

.day-events {
  font-size: .6rem;
  line-height: 1.4;
  color: var(--accent);
  margin-top: auto;
  padding-top: 2px;
  border-top: 1px solid #e8e3db;
}
.day-events span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Notes */
.notes { margin-top: 24px; background: #fff; border-radius: 8px; padding: 20px 24px; border: 1px solid #e8e3db; font-size: .85rem; color: var(--text-secondary); line-height: 2; }
.notes h3 { font-size: .95rem; color: var(--charcoal); margin-bottom: 8px; font-weight: 500; }
.notes ul { list-style: none; padding: 0; }
.notes li { padding-left: 1.2em; position: relative; }
.notes li::before { content: '●'; position: absolute; left: 0; color: var(--accent); font-size: .6rem; top: .25em; }

/* Responsive */

@media (max-width: 640px) {
  .calendar-grid { gap: 1px; }
  .day-cell { min-height: 70px; padding: 4px 3px; }
  .day-number { font-size: .85rem; }
  .day-hours { font-size: .55rem; }
  .day-events { font-size: .5rem; }
  .day-header { font-size: .7rem; padding: 6px 2px; }
  .legend { gap: 10px; font-size: .75rem; }
}

@media (max-width: 400px) {
  .day-cell { min-height: 58px; padding: 2px; }
  .day-hours { font-size: .5rem; }
  .day-events { font-size: .45rem; }
}

/* ===== Collapsible previous month ===== */
.prev-month-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: 1px solid #e8e3db;
  border-radius: 8px;
  padding: 14px 20px;
  margin-top: 40px;
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: .9rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: .04em;
  transition: all 0.3s ease;
}
.prev-month-toggle:hover {
  background: #fff;
  border-color: var(--accent);
  color: var(--charcoal);
}
.prev-month-toggle .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: .7rem;
}
.prev-month-toggle.open .arrow {
  transform: rotate(180deg);
}
.prev-month-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.prev-month-content.open {
  max-height: 1200px;
}
.prev-month-inner {
  padding-top: 24px;
}
