.diet-calendar-module {
  margin: 34px 0 28px;
  color: #1d1d1f;
}

.diet-calendar-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.diet-calendar-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 780;
}

.diet-calendar-subtitle {
  margin: 7px 0 0;
  color: #6e6e73;
  font-size: 13px;
  line-height: 1.5;
}

.diet-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: #6e6e73;
  font-size: 12px;
}

.diet-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.diet-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #d1d5db;
}

.diet-legend-dot.good { background: #8bc7a0; }
.diet-legend-dot.caution { background: #f2b56b; }
.diet-legend-dot.risk { background: #e88b8b; }
.diet-legend-dot.missing { background: #d8dadd; }
.diet-legend-dot.move { background: #54b8b0; }

.diet-month-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.diet-stat-card {
  padding: 15px 16px;
  border: 1px solid #e5e5e7;
  border-radius: 10px;
  background: #ffffff;
}

.diet-stat-value {
  font-size: 22px;
  line-height: 1.1;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.diet-stat-label {
  margin-top: 7px;
  color: #6e6e73;
  font-size: 12px;
}

.diet-calendar-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.diet-week-labels,
.diet-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  gap: 8px;
  min-width: 820px;
}

.diet-week-label {
  color: #8a8a8f;
  font-size: 12px;
  font-weight: 720;
  text-align: center;
}

.diet-day-cell {
  min-height: 122px;
  position: relative;
  border: 1px solid #e5e5e7;
  border-radius: 10px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.diet-day-cell:hover,
.diet-day-cell.is-open {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  border-color: rgba(249, 115, 22, 0.28);
}

.diet-day-cell.is-empty {
  cursor: default;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.diet-day-inner {
  display: grid;
  gap: 8px;
  padding: 11px;
}

.diet-day-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.diet-day-number {
  font-size: 18px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.diet-day-status {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #d8dadd;
}

.diet-day-cell.status-good { background: #f5fbf7; border-color: #cfe7d5; }
.diet-day-cell.status-caution { background: #fff9f1; border-color: #f4d2a6; }
.diet-day-cell.status-risk { background: #fff6f6; border-color: #efc3c3; }
.diet-day-cell.status-missing { background: #f7f7f8; border-color: #e1e2e5; color: #8a8a8f; }
.diet-day-cell.status-good .diet-day-status { background: #72b987; }
.diet-day-cell.status-caution .diet-day-status { background: #e9a94f; }
.diet-day-cell.status-risk .diet-day-status { background: #db7373; }
.diet-day-cell.status-missing .diet-day-status { background: #c5c7cc; }

.diet-day-kcal {
  font-size: 14px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.diet-day-burn {
  color: #4b9f98;
  font-size: 12px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}

.diet-indicators {
  display: flex;
  gap: 5px;
  align-items: center;
}

.diet-indicator {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 10px;
  font-weight: 780;
  background: #c5c7cc;
}

.diet-indicator.good { background: #72b987; }
.diet-indicator.caution { background: #e9a94f; }
.diet-indicator.risk { background: #db7373; }
.diet-indicator.missing { background: #c5c7cc; }
.diet-indicator.move-high { background: #43aaa3; }

.diet-day-summary {
  display: none;
  margin-top: 2px;
  color: #515154;
  font-size: 12px;
  line-height: 1.45;
}

.diet-day-cell:hover .diet-day-summary,
.diet-day-cell.is-open .diet-day-summary {
  display: block;
}

.diet-health-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.diet-health-tag {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #8a5a18;
  font-size: 10px;
  font-weight: 720;
}

@media (max-width: 760px) {
  .diet-calendar-head {
    display: block;
  }

  .diet-calendar-legend {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .diet-month-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diet-week-labels,
  .diet-calendar-grid {
    grid-template-columns: repeat(7, 84px);
    gap: 6px;
    min-width: 624px;
  }

  .diet-day-cell {
    min-height: 112px;
    border-radius: 9px;
  }

  .diet-day-inner {
    padding: 9px;
    gap: 7px;
  }

  .diet-indicator {
    width: 15px;
    height: 15px;
    font-size: 9px;
  }

  .diet-day-kcal {
    font-size: 13px;
  }
}
