/* スケジュールカレンダー */
.sc-container {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sc-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.sc-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #7A7673;
  min-width: 160px;
  text-align: center;
  margin: 0;
}

.sc-nav {
  width: 36px;
  height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: #fff;
  color: #7A7673;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.sc-nav:hover {
  background: #F5E6D8;
  border-color: #C4A882;
}

.sc-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 2px solid #C4A882;
  margin-bottom: 2px;
}

.sc-weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #7A7673;
  padding: 8px 0;
}
.sc-weekday.sc-sun { color: #dc2626; }
.sc-weekday.sc-sat { color: #2563eb; }

.sc-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #e5e7eb;
  border: 1px solid #e5e7eb;
  border-top: none;
}

.sc-cell {
  background: #fff;
  min-height: 80px;
  padding: 4px;
  position: relative;
}
.sc-cell.sc-empty {
  background: #fafaf9;
  min-height: 80px;
}
.sc-cell.sc-today {
  background: #FFFBF0;
}
.sc-cell.sc-past {
  background: #fafaf9;
}

.sc-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: #7A7673;
  padding: 2px 4px;
  line-height: 1;
}
.sc-sun .sc-date { color: #dc2626; }
.sc-sat .sc-date { color: #2563eb; }
.sc-today .sc-date {
  background: #C4A882;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sc-past .sc-date { color: #bcb8b5; }

.sc-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}

.sc-event {
  display: flex;
  flex-direction: column;
  padding: 2px 4px;
  border-radius: 3px;
  border-left: 3px solid #C4A882;
  background: #FBF8F4;
  text-decoration: none;
  transition: background 0.15s;
}
.sc-event-link:hover {
  background: #F5E6D8;
}

.sc-event-name {
  font-size: 0.6rem;
  font-weight: 600;
  color: #7A7673;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-event-time {
  font-size: 0.55rem;
  color: #9ca3af;
  line-height: 1;
}

.sc-event-full {
  background: #f3f4f6;
  opacity: 0.7;
}
.sc-event-full .sc-event-name {
  color: #9ca3af;
}

.sc-event-past {
  opacity: 0.5;
}

.sc-event-closed {
  background: #fefce8;
  opacity: 0.8;
}
.sc-event-closed .sc-event-name {
  color: #854d0e;
}

.sc-event-finished {
  background: #f3f4f6;
  opacity: 0.4;
}
.sc-event-finished .sc-event-name {
  color: #9ca3af;
  text-decoration: line-through;
}

.sc-event-badge {
  font-size: 0.5rem;
  font-weight: 700;
  padding: 0 3px;
  border-radius: 2px;
  line-height: 1.4;
}
.sc-badge-full {
  color: #dc2626;
  background: #fee2e2;
  align-self: flex-start;
}
.sc-badge-closed {
  color: #854d0e;
  background: #fef9c3;
  align-self: flex-start;
}

.sc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 4px 4px;
  justify-content: center;
}

.sc-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sc-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.sc-legend-name {
  font-size: 0.75rem;
  color: #7A7673;
}

/* モバイル対応 */
@media (max-width: 640px) {
  .sc-cell {
    min-height: 60px;
    padding: 2px;
  }
  .sc-date {
    font-size: 0.7rem;
  }
  .sc-event-name {
    font-size: 0.5rem;
  }
  .sc-event-time {
    display: none;
  }
  .sc-title {
    font-size: 1rem;
    min-width: 120px;
  }
  .sc-legend {
    gap: 8px;
  }
  .sc-legend-name {
    font-size: 0.65rem;
  }
}
