*,
::before,
::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

button {
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}

input {
  border: none;
  outline: none;
  font-family: inherit;
  background: transparent;
}

svg {
  display: block;
}

.calendar {
  position: fixed;
  z-index: 900;
  width: 380px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  font-family: "Noto Sans JP", "Helvetica Neue", sans-serif;
  user-select: none;
}

.calendar__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding: 0 8px;
  border-bottom: 1px solid #f0f0f0;
  cursor: grab;
  user-select: none;
}

.calendar__bar:active {
  cursor: grabbing;
}

.calendar__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #555555;
}

.calendar__body {
  padding: 20px;
}

.calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}

.calendar__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  color: #444444;
}

.calendar__title {
  padding: 8px 24px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #222222;
}

.calendar__weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
  text-align: center;
}

.calendar__weekday {
  padding: 6px 0;
  font-size: 12px;
  font-weight: 600;
  color: #777777;
}

.calendar__weekday--sunday {
  color: #cc4444;
}

.calendar__weekday--saturday {
  color: #4488aa;
}

.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.calendar__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 44px;
  height: 54px;
  margin: 0 auto;
  padding-top: 2px;
  cursor: pointer;
}

.calendar__cell--empty {
  cursor: default;
}

.calendar__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 15px;
  color: #222222;
}

.calendar__number--sunday {
  color: #cc4444;
}

.calendar__number--saturday {
  color: #4488aa;
}

.calendar__number--today {
  font-weight: 700;
  color: #ffffff;
  background: #222222;
  border-radius: 50%;
}

.calendar__number--edge {
  font-weight: 700;
  color: #ffffff;
  border-radius: 50%;
}

.calendar__number--in-selection {
  border-radius: 0;
}

.calendar__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 8px;
}

.calendar__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.calendar__footer {
  margin-top: 16px;
  padding: 0 4px;
}

.panel {
  overflow: hidden;
  width: 32px;
  height: 32px;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  transition: width 0.35s ease, height 0.35s ease, border-radius 0.35s ease;
}

.panel--open {
  width: 100%;
  height: 130px;
  border-radius: 12px;
}

.panel__header {
  display: flex;
  align-items: center;
  height: 30px;
}

.panel__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  color: #555555;
}

.panel__label {
  margin-left: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #555555;
}

.panel__content {
  padding: 0 12px 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease 0.15s;
}

.panel--open .panel__content {
  opacity: 1;
  pointer-events: auto;
}

.panel__main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel__color {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.panel__input {
  flex: 1;
  padding: 8px 0;
  border-bottom: 1px solid #eeeeee;
  font-size: 14px;
  color: #222222;
}

.panel__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.panel__register {
  padding: 6px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: #222222;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
}

.year-month {
  width: 520px;
  max-height: 80vh;
  padding: 28px 24px 20px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  overflow-y: auto;
}

.year-month__main {
  display: flex;
  gap: 24px;
}

.year-month__column {
  flex: 1;
}

.year-month__section-label {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #888888;
}

.year-month__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.year-month__button {
  padding: 9px 0;
  border-radius: 8px;
  font-size: 14px;
  color: #333333;
  background: #f5f5f5;
}

.year-month__button--active {
  font-weight: 700;
  color: #ffffff;
  background: #222222;
}

.year-month__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.year-month__cancel {
  padding: 8px 20px;
  font-size: 14px;
  color: #666666;
}

.year-month__confirm {
  padding: 8px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background: #222222;
}

.schedule-modal {
  display: flex;
  flex-direction: column;
  width: 340px;
  max-height: 70vh;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.schedule-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.schedule-modal__spacer {
  width: 32px;
  height: 32px;
}

.schedule-modal__date {
  font-size: 15px;
  font-weight: 600;
  color: #222222;
}

.schedule-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #555555;
}

.schedule-modal__main {
  flex: 1;
  padding: 4px 16px 16px;
  overflow-y: auto;
}

.schedule-modal__empty {
  padding: 24px 0;
  font-size: 14px;
  text-align: center;
  color: #aaaaaa;
}

.schedule-modal__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.schedule-modal__dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.schedule-modal__title {
  font-size: 14px;
  color: #333333;
}

.color-picker {
  padding: 20px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.color-picker__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.color-picker__item {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.color-picker__item--active {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #222222;
}

body {
  background: #ffffff;
  font-family: "Noto Sans JP", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}