* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, sans-serif;
  background: #f3f4f6;
  min-height: 100vh;
  padding: 1rem;
}

.cal-app {
  max-width: 700px;
  margin: 0 auto;
  background: #fff;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.cal-header button {
  background: #4f46e5;
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
}

.weekdays,
.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  text-align: center;
}

.weekdays {
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 600;
}

.days button {
  aspect-ratio: 1;
  background: #f9fafb;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  position: relative;
}

.days button.today {
  background: #eef2ff;
  border-color: #4f46e5;
}

.days button.selected {
  background: #4f46e5;
  color: #fff;
}

.days button.has-event::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background: #ef4444;
  border-radius: 50%;
}

.event-panel {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.event-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.event-form input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.event-form button {
  padding: 0.5rem 1rem;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.event-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.event-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: #f9fafb;
  border-radius: 6px;
}

.event-list button {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}